Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add to the collection and set the home page of the asp.net website that is perfectly compatible with ie and firefox

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the "how to achieve perfect compatibility between ie and firefox asp.net website to join the collection and set up the home page" related knowledge, in the actual case operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

The copy code is as follows:

Function AddFavorite (sURL, sTitle) {

Try {

Window.external.addFavorite (sURL, sTitle)

}

Catch (e) {

Try {

Window.sidebar.addPanel (sTitle, sURL, "")

}

Catch (e) {

Alert ("failed to add favorites, please use Ctrl+D to add")

}

}

}

Function SetHome (obj, vrl) {

Try {

Obj.style.behavior = 'url (# default#homepage)'; obj.setHomePage (vrl)

}

Catch (e) {

If (window.netscape) {

Try {

Netscape.security.PrivilegeManager.enablePrivilege ("UniversalXPConnect")

}

Catch (e) {

Alert ("this operation is rejected by the browser!\ nPlease enter" about:config "in the browser address bar and enter\ nand then set the value of [signed.applets.codebase_principal_support] to 'true', double-click.")

}

Var prefs = Components.classes ['@ mozilla.org/preferences-service;1'] .getService (Components.interfaces.nsIPrefBranch)

Prefs.setCharPref ('browser.startup.homepage', vrl)

}

}

}

The copy code is as follows:

*

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report