摘要: javascript版本1String.prototype.html=function(){2varreg=/(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g;3returnthis.replace(reg,'<ahref="$1$2">$1$2</a>');4};56varv="欢迎访问我的博客:http://www.cnblogs.com/yimu";7alert(v.html()); //欢迎访问我的博客:<ahref="http://www 阅读全文
posted @ 2012-09-04 16:01 易木 阅读(351) 评论(0) 推荐(0) 编辑