I want to replace any keyword which displays on html page with keyword with link. I want to do this by javascript. This keyword can be already linked, if this keyword is already linked then I don't want to link this keyword with new link tag but if it is not linked then link with some url.

This keyword will also not linked when it is an alt text of an image or used in script or somewhere else which is not displayed on page.

I have to do this using javascript. Can somebody suggest me how to do this?