欢迎光临
我们一直在努力

pb中动态创建浏览器的OLE对象-数据库专栏,其他相关

建站超值云服务器,限时71元/月

动态创建浏览器的ole对象
integer result
oleobject objexplorer,iedoc
objexplorer = create oleobject
result = objexplorer.connecttonewobject( “internetexplorer.application”)
if result = 0 then
 objexplorer.navigate(“about:blank”)
 iedoc = objexplorer.document
 objexplorer.toolbar = 0
 objexplorer.statusbar = 0
 objexplorer.width = 300
 objexplorer.height = 150
 objexplorer.left = 0
 objexplorer.top = 0
 objexplorer.visible = 1
end if

//这个可以执行js

oleobject wshshell
wshshell = create oleobject
wshshell.connecttonewobject( “wscript.shell”)
integer li_return
li_return = wshshell.run(“cscript e:\validate.js”, 1, true)
messagebox(“”,li_return)
wshshell.disconnectobject ( )
destroy wshshell
ole嵌入浏览器,如何调用其载入网页中的函数
比如网页中有这么个函数:
<script language=javascript>
 function showmessage(img_name)
 {
  alert(img_name);
 }
 </script>

pb中调用:
ole_1.object.document.parentwindow.showmessage(“吞硬币的小猪”);

不过注意,javascript的函数是区分大小写的,而pb对大小写不敏感:),因此只有网页中函数名称是小写的时候,才能够在pb中调用。

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » pb中动态创建浏览器的OLE对象-数据库专栏,其他相关
分享到: 更多 (0)

相关推荐

  • 暂无文章