阅读背景:

在重写HTML的同时,动态地在文本周围添加锚标记

来源:互联网 

I'm using javascript, jQuery and regex to add anchors (#hashtag) around all hashtags on the page. The regex detects things that are hashtags, and then I use jQuery to re-write the HTML and a javascript .replace() to add in the anchor tags. I also do a javascript if statement so it doesn't replace things inside of script and style tags.I'm using javascript, jQuery and regex to add a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: