Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在普通页面源中查看 javascript 文件的全部内容?我的 javascipt 文件包含许多链接,当我执行普通页面源时,我希望这些链接可见?谁能建议我如何实现它?
好吧,一方面,您可以将脚本嵌入页面中。
而不是<script src="abc.js"></script>,请执行以下操作:
<script src="abc.js"></script>
<script> //Full contents of abc.js here </script>
不过,我不明白你为什么要这样做。大多数开发人员工具都非常先进,您可以在旁边获得一个包含脚本的列表来检查(例如,Chrome 开发工具中的“源”选项卡)