vb用webbrowser如何执行网上的两个javascript?
用写入html的方法,以上两个脚本不能执行。<scriptlanguage="JavaScript"type="text/javascript"src="http://w...
用写入html的方法,以上两个脚本不能执行。
<script language="JavaScript" type="text/javascript" src="http://www.test.com/1.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.test.com/2.js"></script> 展开
<script language="JavaScript" type="text/javascript" src="http://www.test.com/1.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.test.com/2.js"></script> 展开
1个回答
展开全部
你是这样写的吗?
webBrowser1.DocumentText = _
"<html><head>" & _
"<script language=""JavaScript"" type=""text/javascript"" src=""http://www.test.com/1.js""></script>" & _
"<script language=""JavaScript"" type=""text/javascript"" src=""http://www.test.com/2.js""></script>" & _
"</head><body>" & _
"<button onclick=""window.external.Test('called from script code')"" > " & _
"call client code from script code</button>" & _
"</body></html>"
webBrowser1.DocumentText = _
"<html><head>" & _
"<script language=""JavaScript"" type=""text/javascript"" src=""http://www.test.com/1.js""></script>" & _
"<script language=""JavaScript"" type=""text/javascript"" src=""http://www.test.com/2.js""></script>" & _
"</head><body>" & _
"<button onclick=""window.external.Test('called from script code')"" > " & _
"call client code from script code</button>" & _
"</body></html>"
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询