MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » javaScript中连接有关问题

javaScript中连接有关问题(2)

www.MyException.Cn  网友分享于:2013-01-08  浏览:21次


//------------定义一个清空各菜单的函数--------------
function   startItem()
{
for(i=0;i <item_num;i++)
document.all.titem.cells[2*i+1].innerHTML= " ";
}
//------------------定义结束----------------------

//------------定义一个菜单展开的函数----------------
function   openItem(n)
{
if(document.all.titem.cells[n*2+1].innerHTML== " ")
{
startItem();
document.all.titem.cells[n*2+1].innerHTML=item[n];
}
else
startItem();
}
//------------------定义结束----------------------

//-----------------开始实现菜单-------------------
document.writeln( " <table   id=titem> ");
document.writeln( "     <tr> <td   height=20   valign=bottom> <span   class=px7> ●   </span> <a   class=parentlink   href=javascript:   onclick=javascript:openItem(0);this.blur();> 文章管理 </a> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( "     <tr> <td   height=20   valign=bottom> <span   class=px7> ●   </span> <a   class=parentlink   href=javascript:   onclick=javascript:openItem(1);this.blur();> 教师管理 </a> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( "     <tr> <td   height=20   valign=bottom> <span   class=px7> ●   </span> <a   class=parentlink   href=javascript:   onclick=javascript:openItem(2);this.blur();> 学生管理 </a> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( "     <tr> <td   height=20   valign=bottom> <span   class=px7> ●   </span> <a   class=parentlink   href=javascript:   onclick=javascript:openItem(3);this.blur();> 课程管理 </a> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( "     <tr> <td   height=20   valign=bottom> <span   class=px7> ●   </span> <a   class=parentlink   href=javascript:   onclick=javascript:openItem(4);this.blur();> 退出系统 </a> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( "     <tr> <td   class=childlink> </td> </tr> ");
document.writeln( " </table> ");
//------------------菜单结束-----------------------
</script>


</td>
    </tr>
    <tr>
        <td> &nbsp; </td>
    </tr>
    <tr>
        <td> &nbsp; </td>
    </tr>
    <tr>
        <td> &nbsp; </td>
    </tr>
</table>
</body>
</html>
摆脱个为:
item_link[0][0]= "javascript: ";
item_link[0][1]= "javascript: ";
item_link[0][2]= "javascript: ";
item_link[1][1]= "javascript: ";

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有