What is the difference between CreateObject and Wscript.CreateObject?

前端 未结 3 651
梦谈多话
梦谈多话 2020-12-09 10:32

Does anyone know the reasoning behind having the option using:

Wscript.CreateObject(\"some.object\")

and

CreateObject(\"som         


        
3条回答
  •  既然无缘
    2020-12-09 11:16

    JScript does not have a global CreateObject ? WScript can't use JScript ?

    Code from devGuru

    // JScript
    var objIE = WScript.CreateObject("InternetExplorer.Application","objIE_")
    objIE.Visible = true
    
    while (objIE.Visible){
        WScript.Sleep(500);
    }
    
    function objIE_NavigateComplete2(pDisp, URL){
        WScript.Echo("You just navigated to", URL)
    } 
    
    function objIE_OnQuit(){
        boolBrowserRunning = false ;
    }
    

提交回复
热议问题