I need simple JS code(pure JS,no frameworks) to rewrite piece of text into linked anchor(hyperlink) when visitor load page.
Or to be more precise, something same like many advertising services using:
– put JS on existing page
– when JS is fired it connect to my servers, find some data and
rewrites certain phrases in page content into hyperlinks
For now I done part of job where fired JS contact my server, finding appropriate phrases which will convert to hyperlinks, but don’t have idea how to rewrite phrase on page into hyperlink.
So, if any body have pure JS solution for this please share with me 🙂
hrefPath is path which you can find to your server for rewrite
or
change index with 0 to your requirdment