Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个网页,我在其中动态插入®注册商标的实体®,但不幸的是,它出现®在页面中,我期望的是注册商标。
®
®
我在用
$(selctor).text("®");
请帮助我。提前感谢您的帮助。
正如您所说,解决方案是$(selector).html('®')..
$(selector).html('®').
jQuery 文档提供了一个示例说明为什么会这样:
http://api.jquery.com/text/
The code $( "div.demo-container" ).text( "<p>This is a test.</p>" ); will produce the following DOM output:
<div class="demo-container"> <p>This is a test.</p> </div>