日期:2014-05-16  浏览次数:20312 次

添加到收藏
if(document.all){
window.external.addFavorite("http://www.ifindu.com.cn","六人行");
}
else if(window.sidebar){
window.sidebar.addPanel("六人行","http://www.ifindu.com.cn","");
}



为什么会报错

------解决方案--------------------
if (window.sidebar && window.sidebar.addPanel) {
window.sidebar.addPanel("六人行","http://www.ifindu.com.cn","");
} else if (window.external) {
window.external.addFavorite("http://www.ifindu.com.cn", "六人行");
} else {
alert("do not support");
}