图片链接  <a style="cursor:hand" onclick="this.style.behavior='url(../../)';  this.setHomePage('');">  <img width=16 height=16 border=0 src="images/logo.gif">  <u> Set as Home Page</u></a> 
 
 
  1.文字型:  <a onclick="this.style.behavior='url(../../)';this.setHomePage('');" href="#">设为首页</a>  范例:  设为首页 
  2.按钮型:  <input TYPE="button" VALUE=" 设为首页 " onclick="this.style.behavior='url(../../)';this.setHomePage('');" href="#"> 
 
  离开时自动提示设为首页 
  <body onunload="BASEBody.style.behavior='url(../../)';if(!(BASEBody.isHomePage('')))BASEBody.setHomePage('');"> 
 
  -------------------------------------------------------------  打开页面时自动弹出窗口询问是否设为首页  将以下代码放在<head></head>之间: 
  <script language="javascript">  function myhomepage(){  this.homepage.style.behavior='url(../../)';this.homepage.sethomepage('');  }  </script>  <p align="center"><a href="http:netbei.com" name="homepage"  onclick="myhomepage();"></a> 
 
 
 
  再将下面代码加入<body>内: 
  onload="myhomepage();"  即:<body onload="myhomepage();"> 
  ------------------------------------------------------------------------------  鼠标指向时提示设为首页 
  将下列代码插入<body>区中: 
  <A href="" onmouseover="this.style.behavior='url(../../)';this.setHomePage('');" target="_blank">设为首页</A>  -------------------------------------------------------------------------------  关闭当前窗口的功能 
  这里我们可以先输入用来标示的文字“关闭窗口”,用鼠标拖动选中它,在“Link”输入框中键入“/”,同时切入源代码窗口,在链接代码中键入该事件-onclick=“javascript:window.close(); return false;”。  完整的代码为:< a href=“/”onclick=“javascript:window.close(); return false;”>关闭窗口< /a> |