is a compatible with IE and Firefox to join the collection code, chrome and opera itself does not support the collection, to achieve the chrome to join the collection please
function Createicon () {
var desktop = google.gears.factory.create ("Beta.desktop");
var description = "Google it, you know!" ";
var name = "Google"; Name does not support Chinese
var icons = {"32x32": "Images/32.gif"};
Desktop.createshortcut (name, "index.html", icons, description);
}
How to use:
<a href= "###" title= "http://www.111cn.net" onclick= "Createicon ()" > Add Favorites | Bookmark Hidden </a>
Using this method, you can also add the method fragment to a try
Compatible with IE and Firefox to add favorites code
Function Addfavorite (sURL, stitle) {
try {
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&N bsp; //ie
window.external.addFavorite (sURL, stitle);
} catch (e) {
try {
//firefox
Window.sidebar.addPanel (Stitle, sURL, "");
} catch (e) {
alert ("Your browser does not support automatic collection, please set it manually!") "," prompt info ");
}
}
}