Oct 31 2007

Firefox下提示“Node cannot be inserted at the specified point in the hierarchy”的问题

Posted by neio

Tags: , , ,

Node cannot be inserted at the specified point in the hierarchy” code: “3

出现这个问题是因为要被插入的元素不可插入。

在Firefox下,即使一个换行符号”\n”,都会被解析成DOM的一部分,使之成为一个文本域。而这个文本是不允许插入子节点的。而在IE下,就会忽略这些无意义的换行符等。

顺带提一下,我们通常都说Firefox更接近W3C标准,可偏偏在有些问题上,IE做的比Firefox好。Firefox对规范过于宽松的解释,很容易造成不必要的麻烦和错误,很多时候比不支持规范有过之无不及。

再举个例子:

<div name=”e1″>

<ul name=”e2″>

<li>op1</li>

<li name=”e3″></li>

</ul>

</div>

<a href=”#” name=”e4″>AA</a>

<form name=”e5″>

<input name=”e6″ type=”text”/>

</form>

使用一下Javascript来取值:

l = " ";

for(var i =1;i<7 ;i++){

l += document.getElementsByName("e"+i)[0].tagName + "  ";

}

alert(l);

那么在Firefox下将得到

div ul li a form input

而在IE下得到

a form input

因为DIV,UL,LI,P标记都不支持name属性,所以这里IE的做法是正确的。

Filed under : Essay Pro, 汉语 | No Comments »
Jul 17 2007

www.msfirefox.com

Posted by neio

今天发现个网站, msfirefox

搞微软与火狐的融合? 还有TakeOver接管其他一切反病毒软件?

一切一切,好多讽刺,极为幽默..

Filed under : Websites, 汉语 | No Comments »
Jun 25 2007

Firefox 本地调试提示用户密码的解决方法

Posted by neio

Bad oneNot good EnoughJust so soI like itPerfect !!! (3 votes, average: 5 out of 5)
Loading ... Loading ...

(For web developers)

by Neio.Zhou

我们用IIS + Firefox调试的时候总是提示用户名密码,用任何用户名密码都解决不了

而解决方法其实很简单

在firefox地址栏填about:config,进入配置页面

找到 network.automatic-ntlm-auth.trusted-uris

然后双击,填入localhost。 这样就OK了

////////////////

English version

When we debug web application in Firefox with IIS, Firefox my always hit you with username and password. Whatever you entered, nothing will change.

The solution is :

In address bar in firefox, input about:config , you will see config page.

find out network.automatic-ntlm-auth.trusted-uris

double click it, and input localhost.

That OK.