我试图调用javascript函数与下面的代码Webbrowser.Document.InvokeScript()不工作在IE9
Webbrowser.Document.InvokeScript("something")
它的工作IE8,但在IE9无法正常工作。 有人对我有什么建议吗?
我试图调用javascript函数与下面的代码Webbrowser.Document.InvokeScript()不工作在IE9
Webbrowser.Document.InvokeScript("something")
它的工作IE8,但在IE9无法正常工作。 有人对我有什么建议吗?
我解决我的问题与添加以下代码HEAD
标记为IE 9
<meta http-equiv="X-UA-Compatible" content="IE=9">
尝试做这样的
static private void UseIE9DocMode()
{
RegistryKey key = null;
try
{
key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
}
catch (Exception)
{
key = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION");
}
key.SetValue(System.Diagnostics.Process.GetCurrentProcess().MainModule.ModuleName, 9999, RegistryValueKind.DWord);
key.Close();
}
仿真看到那些网址: http://deletethis.net/dave/?page=2&q=document http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-可扩展性 - improvements.aspx
我已经这样做但没有工作 – KF2 2012-08-04 13:55:01