如何设置电流 document.domain的
WebBrowser控件中,以避免在跨域调用访问被拒绝(XMLHTTP请求或iframe /帧接入)
我试过
CurrentDocument = WebBrowserControl.Document
CurrentDocument.domain =example.com
Console.writeline(XX&放大器; CurrentDocument.domain)
这是不行的,不知何故,从未达到console.writeline
我是不是做错了什么?或者我应该用 WebBrowserControl.ActiveXInstance
?
您在写这什么语言?你访问属性。域或不存在的属性。域
How can I set current document.domain
in WebBrowser Control to avoid "Access is denied" in Cross-domain calls (XMLHTTP Requests or Iframe/frame access)?
I've tried
CurrentDocument = WebBrowserControl.Document
CurrentDocument.domain = "example.com"
Console.writeline("xx" & CurrentDocument.domain)
This doesn't work, somehow it never reaches console.writeline
Am I doing something wrong? Or should I use WebBrowserControl.ActiveXInstance
?
What language are you writing this in? Are you accessing the property .Domain or the non-existant property .domain?