VBA的inputBox函數的JScript類比,inputboxjscript

來源:互聯網
上載者:User

VBA的inputBox函數的JScript類比,inputboxjscript


本文要點:


估計這文章一發表就註定被轉抄的命運了,標記一下源地址:http://blog.csdn.net/winsenjiansbomber/article/details/41338243

/* Tips: an alert emulator for Wscript host */function alert(msg){    WScript.Echo(msg+"");}// Binding event handler prefix: ONIE_var IE = WScript.CreateObject("InternetExplorer.Application","ONIE_");IE.left=50;IE.top = 100;IE.height = 200;IE.width = 350;IE.menubar = false;IE.toolbar = false;IE.statusbar = false;IE.resizable = false;IE.navigate("c:\\temp\\readme.html");IE.visible = true;while(!IE.Document.Script.GetValue){ // break when page load and run    WScript.Sleep( 300 );}alert("Please click OK");//alert(IE.Document.Script);//alert(IE.Document.body);//alert(IE.Document.Script.GetValue);alert("GetValue()="+IE.Document.Script.GetValue());WScript.DisconnectObject( IE );IE.Quit()alert("Disconnected");function ONIE_WindowStateChanged(state){    alert("Event: Window State Changed to "+state);}// Raised from loading a document in Internet Explorerfunction ONIE_DownloadBegin(){    alert("Event: Download begins");}/* Raised from quitting Internet Explorer, but we're * disconnecting from the object before calling * the Quit method to terminate Internet Explorer, so  * the dialog box isn't shown. */function ONIE_OnQuit(){    alert("Event: Quit Internet Explorer");}




readme.html:

<!DOCTYPE html><html> <head>  <meta charset="utf-8" />  <title> Test </title> </head> <body>  <label>請輸入:<input id="box" style="width:120px;" /></label>  <script type="text/javascript">    function GetValue(){      return document.getElementById("box").value;    }  </script> </body></html>



關於Windows Scripting Host這個很實用的古董編程技術,Jimbowhy 收集了大量收藏級的資料,請到雲盤免費下載:

http://pan.baidu.com/s/1i3Br5OD

包括:

Advanced VBSript for Microsoft Windows Administrators.pdf
Advanced Windows Script Host Developers Guide (2003) .pdf
IVIEWERS.DLL
Microsoft VBScript Step by Step.pdf
Microsoft Windows指令碼技術.CHM
OLEVIEW.EXE
scd56chs.exe JScript & VBScript 官方參考手冊 5.6中文版
script56.chm JScript & VBScript 官方參考手冊 5.6 e文版
scripten.5.7.0.16535.win2k.exe  JScript & VBScript 安裝程式
scripten.5.7.0.16535.win2k3 .exe
scripthost20dev.chm  Microsoft Windows Script Host 2.0 Developer’s Guide / Günter Born.<
script_repository10.chm System Administration Scripting Guide Script RepositoryVersion 1.0, May 2002
VBScript Programmer's Reference, 3rd Edition.pdf
VBScript程式員參考手冊.pdf
VBS_常用指令碼.docx

sct10en.exe    Microsoft Script Control 1.0

MSSCRIPT-CHS.chm  Microsoft Script Control 1.0 英文手冊的CHM格式

MSSCRIPT-CHS.chm  Microsoft Script Control 1.0 中文手冊的CHM格式


InternetExplorer對象參考:http://msdn.microsoft.com/en-us/library/aa752084

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.