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;
取消
評論
總結
以上是生活随笔為你收集整理的html如何自动转到ie打开,在HTML怎么修改代码以达到在点击超链接时默认以IE浏览器打开?...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 风云之梦情篇java_说一下手机JAVA
- 下一篇: IBM V3700 V2存储简易操作手册