开发者

jquery "html" function returns weird behaviour

开发者 https://www.devze.com 2023-01-29 06:03 出处:网络
i used jquery \"html\" function: $(\'#color .updateMoney\').开发者_开发百科html(\'1\'); to replace a certain string but instead it replace the content with an anchor wrapping like this:

i used jquery "html" function:

$('#color .updateMoney').开发者_开发百科html('1');

to replace a certain string but instead it replace the content with an anchor wrapping like this:

<a xmlns="http://www.w3.org/1999/xhtml">1</a>

Why is that so?


I saw a similiar thread: link text

Apparently it seems to be a firefox problem. I used

$('#color .updateMoney').empty().append('1');

instead to solve the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消