///pc/img/blank.gif" width="12" height="8">当前位置:///default.htm" class="under">亿度网络 -> ///pc/index.htm" class="under">网页制作教程 -> JavaScript
///pc/homepage/javascript/sample/img/bule.gif" width="207" height="13"> ///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1"> ///pc/homepage/javascript/sample/img/js.gif" width="186" height="20"> ///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1">
///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1"> ///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1">
    状态栏显示链接内容 ///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1">  
    ///pc/homepage/javascript/sample/img/bule1.gif" width="28" height="49">  
效 果 演 示 ///pc/homepage/javascript/sample/img/bule2.gif" width="11" height="18">

 

  当你把鼠标放在链接上时,看一下状态栏上显示的内容。

  //www.shanghaigongsi.com.cn/" onMouseOver="StatusMsg('中国十二亿人的网上大学!'); return document.returnValue">亿度网络

  //www.teacher.edu.cn/" onMouseOver="StatusMsg('包含最全面的学校信息!'); return document.returnValue">中国园丁网

  //www.sina.com.cn/" onMouseOver="StatusMsg('中国最全的新闻网站'); return document.returnValue">新浪网

 

   
 
源代码如下 ///pc/homepage/javascript/sample/img/bule2.gif" width="11" height="18">



这段程序放在<head>与</head>之间

这段程序放在<body>与</body>之间

   
源程序讲解: ///pc/homepage/javascript/sample/img/bule2.gif" width="11" height="18">
  ///pc/homepage/javascript/sample/img/bule1.gif" width="28" height="49">  

function StatusMsg(msgStr)
{ status=msgStr;
document.returnValue = true;
定义一个函数,功能是在状态栏中输出msgStr的值。
onMouseOver="StatusMsg('中国十二亿人的网上大学!');
return document.returnValue">
<font color="#0000FF">亿度网络 </font> </a><br>
<a href="http://www.teacher.edu.cn" onMouseOver="StatusMsg('包含最全面的学校信息!');
return document.returnValue">
<font color="#0000FF">中国园丁网</font></a> <br>
<a href="http://www.sina.com.cn" onMouseOver="StatusMsg('中国最全的新闻网站');
return document.returnValue">
<font color="#0000FF">新浪网</font></a>
当鼠标在链接上时,调用StatusMsg()函数。



  ///pc/homepage/javascript/sample/img/blank.gif" width="1" height="1">  
 

 

网页制作 网页设计 网站建设 网站设计 网站制作 做网站 做网页