This is a paragraph
This is another paragraph
请点击按钮来比较两个段落的位置。
1: The two nodes do not belong to the same document. 2: p1 is positioned after p2. 4: p1 is positioned before p2. 8: p1 is positioned inside p2. 16: p2 is positioned inside p1. 32: The two nodes has no relationship, or they are two attributes on the same element.
注释:Internet Explorer 8 以及更早的版本不支持此方法。
注释:返回值可以是值的组合。例如,返回 20 意味着在 p2 在 p1 内部(16),并且 p1 在 p2 之前(4)。