Copying HTML code in Google Chrome's inspect element

你离开我真会死。 提交于 2019-11-29 02:09:54

问题


I have a website of wich I want to copy an HTML code from - how do I copy all the text in inspect element - so I don't get the website's HTML code, but the code that I have already changed so that I don't have elements I don't want in my own webpage?


回答1:


Do the following:

  1. Select the top most element, you want to copy. (To copy all, select <html>)
  2. Right click.
  3. Select Edit as HTML
  4. New sub-window opens up with the HTML text.
  5. This is your chance. Press CTRL+A/CTRL+C and copy the entire text field to a different window.

This is a hacky way, but it's the easiest way to do this.




回答2:


  1. Right click → copy → copy element




回答3:


  1. Select the <html> tag in Elements.
  2. Do CTRL-C.
  3. Check if there is only lefting <!DOCTYPE html> before the <html>.


来源:https://stackoverflow.com/questions/23343191/copying-html-code-in-google-chromes-inspect-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!