How jQuery replaces all URL on a page with a clickable link
This article is about how jQuery replaces all the URL on the page with a clickable link. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Use a clickable link to replace all URL$.fn.replaceUrl = function () {var regexp = / ((ftp | http | https): / / (wicked: {0jue 1} wicked @)? (S+) (: [0-9] +)? (/ / ([washable flowers. Horse flowers% this /])?) / gi;this.each (function () {$(this). Html ($(this). Html (). Replace (regexp,'$1'));}) Return $(this);} / / usage$ ('# GBin1div'). ReplaceUrl (); Thank you for reading! This is the end of the article on "how jQuery replaces all the URL on the page with a clickable link". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!