我想知道是否有一种方法,在Firefox或Chrome的Inspector(开发人员工具)中是否像Dev Tool正在显示的那样复制HTML。

问题描述 投票:0回答:2

toperto to to to to sublime文本,这只是一条长行代码:

<div class="mod_customnav block"><a href="startseite.html#skipNavigation50" class="invisible">Navigation überspringen</a><ul class="level_1"><li class="verband first"><a href="vereine.html" title="Die Vereine im Badischen Sportschützenverband" class="verband first">Vereine</a></li><li class="geschaeftsstelle"><a href="oeffnungzeiten.html" title="Die Öffnungszeiten der Geschäftsstelle" class="geschaeftsstelle">Öffnungzeiten</a></li><li class="geschaeftsstelle"><a href="anfahrtsplan.html" title="So finden Sie uns" class="geschaeftsstelle">Anfahrtsplan</a></li><li class="formulare"><a href="waffenrecht.html" title="Waffenrechtliche Formulare" class="formulare">Waffenrecht</a></li><li><a href="sitemap.html" title="Die Website im Überblick">Sitemap</a></li><li><a href="kontakt.html" title="Kontaktformular">Nachricht an uns</a></li><li class="last"><a href="impressum.html" title="Impressum" class="last">Impressum</a></li></ul><a id="skipNavigation50" class="invisible">&nbsp;</a></div>

据我所知,没有办法以格式化的方式复制HTML。但是,至少对于Firefox Devtools而言,存在

战争请求,要求允许选择树

中显示的元素,以便您可以复制它们。不过,我不确定这是要以格式化的方式复制元素还是仅复制HTML源。 having说,有一些在线工具等在线工具,例如the the the the the the the the the the在线htmlformatter

,可以做到这一点。

在Firefox中,选择一些文本后,您可以右键单击它,然后选择
View Selection Source
html google-chrome-devtools firefox-developer-tools
2个回答
4
投票
DOM Source Selection

的新选项卡以突出显示的选定的HTML源打开。这主要是快速选择所需的目标元素。几乎使用任何IDE,它都可以轻松地格式化选定的DOM。

Firefox浏览器 - >右键单击 - > nexplyor->“标签” - >右键单击 - >编辑为html->选择全部 - >coppy

在我这边工作。

theres sublime插件,您可以安装ctrl + o(我猜现在无法测试插件的快捷方式)“%formater%”只需输入并安装该html格式化插件,它应该自动对代码进行分类。或使用atom.io,支架

0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.