国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

pb中動態創建瀏覽器的OLE對象

2024-07-21 02:09:56
字體:
來源:轉載
供稿:網友
動態創建瀏覽器的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中調用。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 蓬莱市| 江陵县| 特克斯县| 吉安市| 巴彦淖尔市| 富宁县| 仙游县| 财经| 双城市| 新民市| 塔城市| 兴城市| 新巴尔虎右旗| 青阳县| 翁牛特旗| 翼城县| 务川| 钟祥市| 阿尔山市| 灌阳县| 安国市| 绩溪县| 丽水市| 郸城县| 麻江县| 温泉县| 留坝县| 定西市| 麦盖提县| 新巴尔虎左旗| 镇赉县| 南郑县| 新乡县| 尚志市| 龙里县| 军事| 新竹市| 皮山县| 三江| 旬阳县| 南丹县|