日期:2014-05-18  浏览次数:20645 次

JavaScript问题高手一定帮我看看
<!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> 隐藏的浮动导航面板 </title>
<script   type= "text/javascript ">
<!--
var   menu_width   =   150;
var   show_width   =   20
var   menu_top   =   40;
var   move_mode   =   "a ";

function   init()
{
addMenuHeader();
addItem( "电科技大 ", "http://www.sohu.com ", "_blank ");
addItem( "清华大学 ", "http://www.sohu.com ", "_blank ");
addItem( "北京大学 ", "http://www.sohu.com ", "_blank ");
addItem( "上海交大 ", "http://www.sohu.com ", "_blank ");
addMenuFoot();
document.getElementById( 'float_menu ').style.left   =   menu_width;
document.getElementById( 'float_menu ').style.visibility   =   "visible ";
}

function   addMenuHeader()
{
var   content   =   " <div   id   =   'float_menu '   style   =   'position.absolute;   left:0px;   top:0px; '+menu_top+ '   width: ' "+eval(menu_width+20+2)+ "; '   onmouseover   =   ' "+moveOut()+ "; '   onmouseout   =   ' "+moveBack()+ "; '> ";
content   +=   " <table   width   =   '100% '   cellpadding   =   '0 '   cellspacing   =   '1 '   bgcolor   =   '#555555 '> ";
content   +=   " <tr   height   =   '20 '> ";
content   +=   " <td   style= 'background:#eeffff; '   width   =   ' "+menu_width+ " '> ";
content   +=   "菜单项 </td> ";
content   +=   " <td   style= 'background:#c0edcc; '   rowspan   =   '50 '   width   =   ' "+eval(show_width   +   2)+ "; ' ";
content   +=   "大 <br> 学 <br> 链 <br> 接 <br> ";
content   +=     " </td> </tr> ";
alert(content);
document.write(content);
}

function   addMenuFoot()
{
content   =   " </table> </div> ";
document.write(content);
}

function   addItem(text,url,target)
{
if(!target   ||   target   ==   " ")
{
target   =   "_blank ";
}
content   =   " <tr   height   =   '20px '> <td   style= 'background:#eeeeff; '> ";
content   +=   " <a   href   =   ' "+url+ " '   target= ' "+target+ " '> "   +   text;
content   +=   " </a> </td> </tr> ";
document.write(content);
}

function   moveOut()
{