100分+100元RMB求助?
a.html
<html>
<head>
<script>
alert("a");
</script>
</head>
<body>
<iframe id="b1" src="b.html"> </iframe>
</body>
</html>
b.html
<html>
<head>
<script>
alert("b");
</script>
</head>
<body>
<a href="javascript:;" onclick="alert('link');">link </a>
<iframe id="c1" src="c.html"> </iframe>
</body>
</html>
c.html
<html>
<head>
<script>
alert("c");
</script>
</head>
</html>
用vs2008 webbrowser控件:
为什么a2没起到作用呢?也就是不能把b.html中的alert屏蔽,但如果点击b.html中的link应该有一个alert弹出,但没有,也就是说屏蔽掉了,但是没屏蔽掉alert('b')
首先感谢!!!
<html>
<head>
<script>
alert("a");
</script>
</head>
<body>
<iframe id="b1" src="b.html"> </iframe>
</body>
</html>
b.html
<html>
<head>
<script>
alert("b");
</script>
</head>
<body>
<a href="javascript:;" onclick="alert('link');">link </a>
<iframe id="c1" src="c.html"> </iframe>
</body>
</html>
c.html
<html>
<head>
<script>
alert("c");
</script>
</head>
</html>
用vs2008 webbrowser控件:
Dim a1 As IHTMLDocument2 = Webbrowser1.Document.Window.Document.DomDocument
a1.parentWindow.execScript("function alert(str){}", "javascript")
Dim a2 As IHTMLDocument2 = Webbrowser1.Document.Window.Frames(0).Document.DomDocument
a2.parentWindow.execScript("function alert(str){}", "javascript")
Dim a3 As IHTMLDocument2 = Webbrowser1.Document.Window.Frames(0).Frames(0).Document.DomDocument
a3.parentWindow.execScript("function alert(str){}", "javascript")
为什么a2没起到作用呢?也就是不能把b.html中的alert屏蔽,但如果点击b.html中的link应该有一个alert弹出,但没有,也就是说屏蔽掉了,但是没屏蔽掉alert('b')
首先感谢!!!
...全文


