Title : Change the URL Text into an Active Link use JavaScript
link : Change the URL Text into an Active Link use JavaScript
Change the URL Text into an Active Link use JavaScript
Tidak mau menulis link tujuan karena takut unsur badlink atau backlink yg tidak sesuai dengan tema blog sobat? Trik dan tips kali ini akan berbicara bagaimana cara merubah teks URL menjadi link hidup! URL/link yg tertera pada address browser biasanya akan dimulai dengan http:// or http- http://www.google.com/
- https://www.google.com/
- ttp://example.com/~pages/pa-ge/?param=foo+bar
- ttp://beben-koben.blogspot.com/2014/05/selection-good-resources-may-2014.html
- https://www.google.com/search?q=tutorial
<script type='text/javascript'>
//<![CDATA[
document.addEventListener("DOMContentLoaded",function(){for(var t=document.evaluate('descendant::text()[contains(self::text(),"ttp") and not(ancestor::a) and not(ancestor::textarea) and not(ancestor::script) and not(ancestor::style)]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),e=0;e<t.snapshotLength;e++){var n=t.snapshotItem(e);n.textContent.match(/h?ttps?:\/\/[a-zA-Z0-9\.\/\-_~\?=&%\+]+/g).forEach(function(t){var e=n.textContent.indexOf(t),a=document.createRange();a.setStart(n,e),a.setEnd(n,e+t.length);var o=document.createElement("a");o.setAttribute("href",0==t.indexOf("http")?t:"h"+t),o.addEventListener("click",function(t){window.open(this.getAttribute("href")),t.preventDefault(),t.stopPropagation()}),a.surroundContents(o),a.detach()})}});
//]]>
</script>
Source by: jsdo.it/kobachi/urltext2anchor
Happy coding \m/
Thus articles Change the URL Text into an Active Link use JavaScript
that is all articles Change the URL Text into an Active Link use JavaScript This time, hopefully can provide benefits to all of you. Okay, see you in another article posting.
You now read the article Change the URL Text into an Active Link use JavaScript with the link address https://autopostingblogspot.blogspot.com/2014/05/change-url-text-into-active-link-use.html
0 Response to "Change the URL Text into an Active Link use JavaScript"
Posting Komentar