设为首页/加入收藏代码_兼容各浏览器ie系列 Firefox/360 部分不兼容 请自己尝试
来源:互联网 发布:java常用类和方法 编辑:程序博客网 时间:2024/05/21 06:54
<body>
<script type="text/javascript">
function addFav() { //加入收藏夹
if (document.all) {
window.external.addFavorite('http://www.baidu.com', 'baidu');
}
else if (window.sidebar) {
window.sidebar.addPanel('baidu', 'http://www.baidu.com', "" );
}
}
function SetHome(obj){
try{
obj.style.behavior='url(#default#homepage)';
obj.setHomePage('http://www.baidu.com');
}catch(e){
if(window.netscape){
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}catch(e){
alert("抱歉,此操作被浏览器拒绝!/n/n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
};
}else{
alert("抱歉,您所使用的浏览器无法完成此操作。/n/n您需要手动将'http://www.baidu.com/'设置为首页。");
};
};
};
</script>
<a href="javascript:void(0);" onclick="SetHome(this)">设为首页</a>
<a href="javascript:;" onclick="addFav()">加入收藏</a>
</body>
<script type="text/javascript">
function addFav() { //加入收藏夹
if (document.all) {
window.external.addFavorite('http://www.baidu.com', 'baidu');
}
else if (window.sidebar) {
window.sidebar.addPanel('baidu', 'http://www.baidu.com', "" );
}
}
function SetHome(obj){
try{
obj.style.behavior='url(#default#homepage)';
obj.setHomePage('http://www.baidu.com');
}catch(e){
if(window.netscape){
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}catch(e){
alert("抱歉,此操作被浏览器拒绝!/n/n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
};
}else{
alert("抱歉,您所使用的浏览器无法完成此操作。/n/n您需要手动将'http://www.baidu.com/'设置为首页。");
};
};
};
</script>
<a href="javascript:void(0);" onclick="SetHome(this)">设为首页</a>
<a href="javascript:;" onclick="addFav()">加入收藏</a>
</body>
- 设为首页/加入收藏代码_兼容各浏览器ie系列 Firefox/360 部分不兼容 请自己尝试
- 设为首页加入收藏代码_兼容各浏览器ie系列Firefox
- 设为首页加入收藏代码_兼容各浏览器ie系列Firefox
- 兼容各浏览器的js加入收藏,设为首页代码
- 加入收藏、设为首页代码,兼容360/火狐/谷歌/IE等主流浏览器
- 设为首页,加入收藏兼容360/火狐/谷歌/IE等主流浏览器的代码
- javascript: 加入收藏 设为首页 功能 兼容Firefox和IE
- 兼容IE和fireFox的设为首页、加入收藏JS代码
- 设为首页代码和加入收藏代码-兼容各种浏览器
- 设为首页代码和加入收藏代码(兼容各种浏览器)
- 设为首页代码和加入收藏代码(兼容各种浏览器)
- 设为首页代码和加入收藏代码(兼容各种浏览器)
- 设为首页代码和加入收藏代码(兼容各种浏览器)
- 设为首页代码和加入收藏代码(兼容各种浏览器)
- 设为首页|加入收藏(ie,f f兼容代码)
- 兼容IE、FF的设为首页,加入收藏代码
- 兼容ie,火狐的设为首页,加入收藏js代码
- 兼容IE,FF的设为首页与加入收藏代码
- 多线程操作数据库CreateInstance 失败
- c#.net上传文件大小限制
- 图像的减法
- A new Tremendous Offspring As well as That You Must Grab
- 开博第一篇
- 设为首页/加入收藏代码_兼容各浏览器ie系列 Firefox/360 部分不兼容 请自己尝试
- 在拷贝(复制)代码前,应该确呆所复制的代码是正确的
- 极度郁闷中····
- VC系统托盘
- SSH Secure Shell Client中文乱码的解决办法
- get available fonts
- easyb学习笔记
- emacs 中的快捷键
- 在Windows上学习Object-C