新学两招:

Dim doc,script
 Set doc=ControlPlanPopWin.document      

' 通过脚本注入改变alert的行为
Set script. =doc.createElement("script")
script.text="var alert=function(){return true}; "
doc.appendChild(script)

' 通过脚本注入改变confirm的行为
Set script. =doc.createElement("script")
script.text="var confirm=function(){return true};"
doc.appendChild(script)

相关文章: