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 »
Oct 25 2007

左派?右派?

Posted by neio

中国政治坐标系测试(北大未名版)

详见上面链接。我按照那个测得的中国政治倾向结果为:

政治立场坐标(左翼<->右翼)0.05,–右翼(Libertarianism)

经济立场坐标(左翼<->右翼)-0.2,–左翼(Communism, Collectivism)

文化立场坐标(保守<->自由)-0.4   –保守(Conservatism)

Filed under : Essay, 汉语 | 3 Comments »
Oct 21 2007

泰迪熊

Posted by neio

Tags: , ,

买了China-pub的书,送了一只可爱的泰迪熊。

在这里Show一下,顺便测试一下恢复运行的www.imneio.com

泰迪熊1

现在这只可爱的Teddy送给Lydia了,所以顺便用照片纪念一下。

Filed under : Photograph, 汉语 | No Comments »
Oct 06 2007

Zoundry Writer

Posted by neio

Here I introduce a offine Blog writter. It’s name is ‘Zoundry Writer’. If you familiar with Window Live Writer, you can get on with Zoundry easily.

This is it’s face:

However , it doesn’t support the Tag, which is recently integrated in Wordpress 2.3. Besides the Slug of WordPress.

This blog is written in Zoundry.

Read more »

Filed under : English, Software | No Comments »
Oct 06 2007

Photographs

Posted by neio

Tags: ,

十一的时候老家一日游,随手拿3230拍了一一点.

老家.夕阳西下
老家.小溪
老家.路灯
老家.田中

Filed under : Photograph, 汉语 | No Comments »