为了让正在做的web文件上传在Firefox跑起来,目前正在改css和js,现将发现的部分问题记录下来,以备以后整理。

在firefox 和 ie 中,对于element:

ie有而firefox没有的属性:parentElement.

  1. parentElement
  2. ...

对previousSibling,nextSibling :

firefox 解释:

previousSibling:The node immediately preceding the given one in the tree, or null if there is no sibling node.

nextSibling :The node immediately following the given one in the tree, or null if there is no sibling node.

ie解释:

previousSibling:Retrieves a reference to the previous child of the parent for the object. 获取对此对象的上一个兄弟对象的引用。

nextSibling :Retrieves a reference to the next child of the parent for the object.获取对此对象的下一个兄弟对象的引用。

对于下面这段代码:

 


        <thead>
            
<tr class="tilleDiv">
              
<td class="title side">
                
</td>
                
<td class="title middle">
                    名称
                
</td>
                
<td class="title size" >
                    大小
                
</td>
                
<td class="title middle">
                    类型
                
</td>
                
<td class="title middle">
                    最后更新
                
</td>
                
<td class="title other">
                    边
                
</td>
            
</tr>
        
</thead>
    
</table>

 

在ie中对其中的document.getElementById("ID_Size").previousSibling或nextSibling 得到的都是tablecell;而在firefox中得到的是text类型(“\n         ”),在这个级别上,理解完全不一样。或者说,firefox 中的tree是只node级别,而ie中是element级别?

 

相关文章: