(1)手动设置IE 默认主页
<A class=date
οnclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://blog.csdn.net/luckyjan')"
href="http://blog.csdn.net/luckyjan/">
<FONT class=abc size=2>
<SPAN class=zhuyue>设为首页</SPAN>
</FONT>
</A>
(2)自动设置IE 默认主页
<script language="javascript">
function SetHomePage(){
if (document.all) {
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://blog.csdn.net/luckyjan');
}
}
SetHomePage(); //自动设置默认主页
</script>
(3)自动添加到设置收藏夹
<script language="javascript">
function addFavorite() {
window.external.addFavorite('http://blog.csdn.net/luckyjan','LuckyJan专栏');
}
addFavorite(); //自动添加到设置收藏夹
</script>
<A class=date
οnclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://blog.csdn.net/luckyjan')"
href="http://blog.csdn.net/luckyjan/">
<FONT class=abc size=2>
<SPAN class=zhuyue>设为首页</SPAN>
</FONT>
</A>
(2)自动设置IE 默认主页
<script language="javascript">
function SetHomePage(){
if (document.all) {
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://blog.csdn.net/luckyjan');
}
}
SetHomePage(); //自动设置默认主页
</script>
(3)自动添加到设置收藏夹
<script language="javascript">
function addFavorite() {
window.external.addFavorite('http://blog.csdn.net/luckyjan','LuckyJan专栏');
}
addFavorite(); //自动添加到设置收藏夹
</script>
(4)怎么样用JAVASCRIPT 判断客户端默认主页
<script language="JavaScript">
var WScript = new ActiveXObject("WScript.Shell");
var key = "HKEY_CURRENT_USER//Software//Microsoft//Internet Explorer//Main//Start Page";
try {
var Result = WScript.RegRead(key);
if((Result=="")||(Result=="about:blank"))
alert("当前默认主页为空!")
else
alert("当前默认主页:"+Result.toString());
} catch( e ) {}
</script>