【发布时间】:2011-08-08 15:44:42
【问题描述】:
您好,我想用一些 Html 文本替换网站链接。
我想用特定的词替换链接
等式。我的 Facebook 网址如下
http://www.facebook.com/chitralekha.in
我想在 Html 页面的每个地方用 <a href='http://www.facebook.com/chitralekha.in'> chitralekha.in </a> 替换这个 http://www.facebook.com/ URL。
我有带有 facebook 链接的 facebook 标签
<label id="lblfacebook">www.facebook.com/chitralekha.in</label>
我希望将其替换为 <label id="lblfacebook"> <a href='www.facebook.com/chitralekha.in'> chitralekha.in</a></label>
例如,我的网站 URL 是固定的。 http://www.facebook.com 或 http://facebook.com。
使用Jquery正则表达式如何实现?
【问题讨论】:
-
请您多解释一下,以便我们都能理解吗? ;-)
标签: jquery regex jquery-selectors javascript-framework