The JS code is as follows:
function Addfavorite () {
var url = window.location;
var title = Document.title;
var ua = Navigator.userAgent.toLowerCase ();
if (Ua.indexof ("360SE") >-1) {
Alert ("Due to the 360 browser feature limit, please press CTRL+D manual collection!") ");
}
else if (Ua.indexof ("MSIE 8") >-1) {
Window.external.AddToFavoritesBar (URL, title); IE8
}
else if (document.all) {
try {
Window.external.addFavorite (URL, title);
} catch (e) {
Alert (' Your browser does not support, please press CTRL+D manual collection! ');
}
}
else if (Window.sidebar) {
Window.sidebar.addPanel (title, URL, "");
}
else {
Alert (' Your browser does not support, please press CTRL+D manual collection! ');
}
}
HML Code:
<a href= "#" onclick= "Javascript:addfavorite ()" > Favorites </a>
360 browsers can not use this method to implement the collection, need to manually collection.
JS Implementation Collection URL