Log in

View Full Version : Find and Replace



Sinopa
12-26-2008, 02:22 PM
Does anyone know where I can get a javascript that finds text in a html page and replaces it with the info/code I want.

Example.I want the script to replace <a href="favs.php">favs</a> with <a href="favs.php">My favs</a><br><a href="pubfavs.php">public favs</a>

I'm going to use it in a greasemonkey script so I can't use tags like <body onLoad="....

Nile
12-26-2008, 02:32 PM
http://www.javascriptkit.com/jsref/regexp.shtml

Sinopa
12-26-2008, 02:37 PM
Sorry, but I'm a complete n00b and that was greek to me :o