使用Element.update()原型函数:
[ ... ]
var link_1 = new Element('a').update( '<' );
var link_2 = new Element('a').update( '<<' );
[ ... ]
仅在IE中我得到:
'link_1' is not defined
如何将字符串"<"写入原型元素?
我建议使用这些字符的HTML实体,而不是实际字符,因为它们通常是HTML标记的开头。
因此,尝试执行update("<")
而不是update("<")
和update("<<")
实体替换列表