Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
阻止javascript文件执行_Javascript_Html_Security - Fatal编程技术网

阻止javascript文件执行

阻止javascript文件执行,javascript,html,security,Javascript,Html,Security,考虑以下文件: index.html <!doctype html> <html> <body> <p id="remove">This will be removed!</p> <script src="script.js"></script> </body> 有没有办法阻止script.js执行 这是一个CTF挑战赛 也许我还应该提一下,我不能编辑其中任何一个。 document.addedve

考虑以下文件:

index.html

<!doctype html>
<html>
<body>
<p id="remove">This will be removed!</p>
<script src="script.js"></script>
</body>
有没有办法阻止script.js执行

这是一个CTF挑战赛

也许我还应该提一下,我不能编辑其中任何一个。

document.addedventListenerDomainContentLoaded,theDomHasLoaded,false; domHasLoadede的函数{ document.getElementByIdremove.innerHTML=; }

这将被删除


您希望何时删除它?为什么不执行它?您是否试图绕过免费服务器上的TOS?为什么要阻止执行?如果不需要从HTML文件中删除JS文件的包含。请澄清,您想用其他javascript还是本地阻止它?如果在本地,您可以在浏览器中禁用js。我想在我无权访问的服务器上阻止它。这是一个CTF挑战赛!我没有访问该文件的权限。然后使用例如创建一个用户脚本。
document.getElementById("remove").innerHTML = ("");