鼠标移出和移进效果

  <style type="text/css">
	/*超链接选中*/
	 .select{
		color:red;
	 }
	 .noselect{
		color:black;
	 }
	 /*超链接手型*/
	 a{
		cursor:hand;
	 }
  </style>
 </HEAD>

 <BODY>
	 <a onmouseout="outCss(this)" onmouseover="overCss(this)">第一个</a>
	 <a onmouseout="outCss(this)" onmouseover="overCss(this)">第一个</a>
	 <a onmouseout="outCss(this)" onmouseover="overCss(this)">第一个</a>
 </BODY>
 <script language="javascript">
	function outCss(obj){
		if(obj.className != "noselect"){
			obj.className = "noselect";
		}
	}

	function overCss(obj){
		if(obj.className != "select"){
			obj.className = "select";
		}
	}
 </script>

 

你可能感兴趣的:(JavaScript,css)