开发者

Search and replace all elements

开发者 https://www.devze.com 2022-12-17 23:47 出处:网络
I need script to append text or delete all matched elements if there are any in textarea. I tried this:

I need script to append text or delete all matched elements if there are any in textarea. I tried this: http://pastie.org/789631 What's开发者_开发技巧 wrong there? Thanks.


Try

txt.replaceText(RegExp(elem,"g"), '');
0

精彩评论

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