Javascript-there is a piece of text with a URL. How can I get it if I want to click a hyperlink on the front end? Is there a good way to front-end?

Source: Internet
Author: User
The text is: {code...}. How can I directly click the hyperlink here? Do I have to splice regular expressions? Regular Expressions cannot be implemented. Is there a simple solution? The text is:

The five-color eyeshadow of the pavilion's natural impression lights up your eyes, and the 9.9 yuan free shipping second-kill after lasting shining coupons, pure welfare !! 9.9 yuan post-coupon free shipping second kill, pure welfare !! 30 yuan computer coupon: http://dwz.cn/2RbiD4 30 yuan mobile phone coupon: 9.9 yuan flash coupon after http://dwz.cn/2Rbidk link: http://s.click.taobao.com/t? E = m % 3D2% 26 s % videos % 2FrR0l % 2Fx0BLb % 2BpKxka6% videos % 2Bon5e % 2BUUq5xoumkE % 3D color, there is always a perfect beauty for you

How can I obtain a hyperlink directly by clicking it? Do I have to splice regular expressions? Regular Expressions cannot be implemented. Is there a simple solution?

Reply content:

The text is:

The five-color eyeshadow of the pavilion's natural impression lights up your eyes, and the 9.9 yuan free shipping second-kill after lasting shining coupons, pure welfare !! 9.9 yuan post-coupon free shipping second kill, pure welfare !! 30 yuan computer coupon: http://dwz.cn/2RbiD4 30 yuan mobile phone coupon: 9.9 yuan flash coupon after http://dwz.cn/2Rbidk link: http://s.click.taobao.com/t? E = m % 3D2% 26 s % videos % 2FrR0l % 2Fx0BLb % 2BpKxka6% videos % 2Bon5e % 2BUUq5xoumkE % 3D color, there is always a perfect beauty for you

How can I obtain a hyperlink directly by clicking it? Do I have to splice regular expressions? Regular Expressions cannot be implemented. Is there a simple solution?

I can only think of regular matching and then package a Layer
Http://jsfiddle.net/mplungjan/Y5y5q/

This can be implemented using the tag. The link you display

Learning is enough. Do you want to make it as powerful and complex as Text Link?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.