开发者

How to clear text in element by jQuery?

开发者 https://www.devze.com 2023-03-29 23:34 出处:网络
Current I using jQuery append() method to add in text in html element. The code fragment as below: $(\".email-address td:nth-child(1)\").append(\"Hello\");

Current I using jQuery append() method to add in text in html element.

The code fragment as below:

$(".email-address td:nth-child(1)").append("Hello");

How can I clear the text I a开发者_如何学JAVAppend previously?

Thank you in advanced.


Use $("selector").text("Hello") instead

0

精彩评论

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

关注公众号