繁体   English   中英

原型Element.update()函数在IE中不起作用

[英]Prototype Element.update() function not working in IE

使用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("&lt;")而不是update("<") update("&lt;")

update("&lt;&lt;")

实体替换清单

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM