易截截图软件、单文件、免安装、纯绿色、仅160KB

这一小段JavaScript代码是什么意思?

麻烦帮助解释一下,对它不太熟悉
这段代码要达到的目的是:当鼠标在文字上面时,文字下面出现下拉菜单。
CSS code:
li:hover ul, li.over ul { //[color=#FF6600] ?这是什么意思[/color]
display: block; //我知道这是显示块信息
}

JScript code:
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over"; // [color=#FF9900]?这是什么意思[/color] }
node.onmouseout=function() {
this.className=this.className.replace(" over", ""); // [color=#FF0000]这是什么意思[/color] }
}
}
}
}
window.onload=startList;

//--><!]]></script>

就是改变样式吧

this.className+=" over"; 等价于 this.className=this.className+" over";
给className连接字符串“ over”


相关问答:

JavaScript游戏玛丽医生Dr Mario实现原理

在很久很久以前,我们这些80后的小朋友终于玩上了自己的小霸王游戏机,超级玛丽,玛丽医生,雪人兄弟,诸多经典游戏让人无法忘怀,成为一个心结!

在完成了俄罗斯方块后,这是我写的又一个JavaScript游戏,玛 ......

C#写JAVASCRIPT 数组

C#写JAVASCRIPT 数组

      protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
& ......

新人javascript问题求助,请各位大哥大姐们来帮忙!

这是我的文本框
<input type="text" size="60" name="password_answer" id="pwdanswer" value="$!password_answer" >
提交按钮
<input clas ......

在html中用javascript代码如何异步获取XML中的值

我要在HTML中用JavaScript代码异步获取XML文件中一个节点的值比如

<?xml version="1.0" encoding="GB2312"?>
<configuration>
  <appSettings>
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号