阻止javascript函数
我正在VB.net中使用webbrowser阻止javascript函数,javascript,.net,vb.net,Javascript,.net,Vb.net,我正在VB.net中使用webbrowser webbrowser1.navigation("MYAWESOMEURL") MYAWESOMEURL有一个javascript函数在iframe中被调用。。下面是源代码的样子 <html> <head> <script src="MYANNOYINGCLASS.js" type="text/javascript"></script> </head>
webbrowser1.navigation("MYAWESOMEURL")
MYAWESOMEURL有一个javascript函数在iframe中被调用。。下面是源代码的样子
<html>
<head>
<script src="MYANNOYINGCLASS.js" type="text/javascript"></script>
</head>
<body>
blah blah ah annoyin stuff
<iframe id="content" src="about:blank" frameborder="0" style="display:none;"></iframe>
<script type="text/javascript">
ANNOYINGCLASS.ANNOYINGFUNCTION(); //Defined in the script src
</script>
blah blah blah annoyin stuff
</body>
</html>
诸如此类的东西
烦扰类。烦扰函数()//在脚本src中定义
胡说八道,胡说八道
我希望这对其他人也有帮助!我完全被难住了。你能在MYAWESOMEURL中传递url参数吗?您可以将代码添加到iframe中吗?我想你不需要烦扰类。烦扰函数();调用?Corrent我不希望调用烦扰类。烦扰函数()。我无法将任何参数传递到url或iframe。我必须访问实际的代码,但我发现hatteringClass.hatteringFunction()会检查hatteringClass.HatteringVariable是否返回true。也许在调用HatteringClass.HatteringFunction之前注入一个调用使变量为true会起作用?我不明白这里…哪个代码是iframe代码,哪个代码在myawesomeurl中被调用?如果你有权访问源代码,你能注释掉函数调用吗?我没有访问源代码的权限。整个文档通过url访问。