i have found that WebBrowser control (both Winforms and WPF) has certain javascript constructs not supported especially when they are rendered using showModalDialog / showModelessDialog calls....
这一点很容易得到推广。
(1) 创建测试的html网页,例如C:Temp Test.htm
。
<input type=button
onclick="showModalDialog( C:\Temp\Test.htm );"
value="Show Me as Modal Page." />
<BR />
<a href="javascript:alert( I am shown. )">
I should work using href.
</a>
<BR />
<a href="#"
onclick="javascript:alert( I am shown. )">
I should work using onclick.
</a>
If you load the page above using the IE browser, both hyperlinks should work. Now in the IE browser, if you you click the "Show Me as Modal Page." button, the same page opens as MSHTML dialog window and again on that both hyperlinks work.
预计会这样做。
(2) 现在创建<条码>WPF或<条码>。 页: 1
<WebBrowser Source="C:TempTest.htm" Height="500" Width="500"/>
如果你使用<条码>WebBrowser控制,两条超级链接都将在装页上工作。
But 如果你使用“Show Me as Modal pp. Button”,将“Show Me”装上“Show Me as Modal pp. Button”,那么“示范窗口就利用第一个超级链接(即<>>>代码)发出警报。 我应当使用《手法》()开展工作。
第二台超链接按预期运行。
您是否认为存在第一个与工作超级联系的工作?
In my case I have no access to the page s content that I am loading using the javascript:showModalDialog()
call, so the issue fix is intended from the web browser s perspective.
http://www.ohchr.org。
他们说,必须使<><>> > 标准>-标准_SCRIPTURL_MITATION 能够做到这一点。 但是,这已经在我的登记册中得以实现。 人均国民核算制度继续说......
By default, this feature is enabled for Internet Explorer and disabled for applications hosting the WebBrowser Control. It has to be manually enabled for webBrowser control.
如何使网络浏览器控制能够做到这一点?