1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > html如何自动转到ie打开 在HTML怎么修改代码以达到在点击超链接时默认以IE浏览器打开?...

html如何自动转到ie打开 在HTML怎么修改代码以达到在点击超链接时默认以IE浏览器打开?...

时间:2018-07-04 05:13:25

相关推荐

html如何自动转到ie打开 在HTML怎么修改代码以达到在点击超链接时默认以IE浏览器打开?...

1. “工具”→“Internet选项”,在打开的窗口中选择“程序”选项卡,然后勾选“检查Internet Explorer是否为默认浏览器”,最后单击“确定”。

这样就可以了啊。

为什么要在代码里面修改呢?

2. C#里面是可以的修改的

/// summary

/// 恢复IE为默认浏览器

/// /summary

/// returns/returns

public static bool ResetIEDefaultBrowser()

{

string mainKey = @http\shell\open\command;

string nameKey = @http\shell\open\ddeexec\Application;

string IEPath = @C:\Program Files\Internet Explorer\iexplore.exe;

bool result = false;

try

{

string value = string.Format(\{0}\ -- \%1\, IEPath);

RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(mainKey, true);

regKey.SetValue(, value);

regKey.Close();

regKey = Registry.ClassesRoot.OpenSubKey(nameKey, true);

regKey.SetValue(, IExplore);

regKey.Close();

result = true;

}

catch

{

}

return result;

取消

评论

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。