在 Google Chrome 的检查元素中复制 HTML 代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23343191/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Copying HTML code in Google Chrome's inspect element
提问by user3581631
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?
我有一个网站,我想从中复制 HTML 代码 -如何复制检查元素中的所有文本- 所以我没有获得网站的 HTML 代码,但我已经更改了代码,所以我没有我自己的网页中没有我不想要的元素?
回答by barryjones
Do the following:
请执行下列操作:
- Select the top most element, you want to copy. (To copy all, select
<html>
) - Right click.
- Select Edit as HTML
- New sub-window opens up with the HTML text.
- This is your chance. Press CTRL+A/CTRL+C and copy the entire text field to a different window.
- 选择要复制的最上面的元素。(要全部复制,请选择
<html>
) - 右键点击。
- 选择编辑为 HTML
- 带有 HTML 文本的新子窗口打开。
- 这是你的机会。按 CTRL+A/CTRL+C 并将整个文本字段复制到不同的窗口。
This is a hacky way, but it's the easiest way to do this.
这是一种hacky 方法,但它是最简单的方法。
回答by Pedro Reis
- Select the
<html>
tag in Elements. - Do CTRL-C.
- Check if there is only lefting
<!DOCTYPE html>
before the<html>
.
<html>
在元素中选择标签。- 执行 CTRL-C。
- 检查
<!DOCTYPE html>
之前是否只剩下<html>
.
回答by Udara Gunawardhana
using httrack software you can download all the website content in your local. httrack : http://www.httrack.com/
使用 httrack 软件,您可以在本地下载所有网站内容。httrack : http://www.httrack.com/