Tip: you can modify some code before running
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Untitled Document</title><style>body{ margin:0px; padding:0px;}#bodd{ float:left; width:1001px; height:400px; background-color:#CCCCCC;}#top{ float:left;}#search_select{ float:left; width:200px; height:20px; background-color:#FFFFFF; cursor:text;}#textdiv{ float:left; width:200px; height:20px; border:1px solid #FFFFFF;}#textdiv_1{ float:left; width:323px; height:135px; border:2px solid #FFFF66; position:absolute; left:20px; top:20px; display:none;}</style><body><div id="bodd"> <div id="textdiv" onmousemove="Showdiv(this,'block')" onmouseout="Showdiv(this,'none')"> <div id="search_select">All categories</div> <div id="textdiv_1"> <ul> <li>Internet</li> <li>Audio and video entertainment</li> <li>Portal website</li> <li>Life information</li> <li>All categories</li> </ul> </div> </div></div><script>var $d = document;function $i(s){return $d.getElementById(s);}function Showdiv(obj,val){var list=$i('textdiv_1');list.style.display=val;}function asd(){var as=document.getElementById("textdiv_1").getElementsByTagName("a");for(var i=0;i<as.length;i++) { as[i].onclick=function(){ var select=$i("search_select"); select.setAttribute("val",this.getAttribute("val")); select.innerHTML=this.innerHTML; select.style.color="#000"; Showdiv(null,"none"); } }}</script><script>asd();</script>
Tip: you can modify some code before running