Example:
Code:

<html>
 <body>
 <script type="text/javascript"> 
{
var txt="Shane Watson";
document.write(txt.replace("Watson","Harwood"));
}
 </script>
 </body> 
</html>

Output:
Shane Harwood

eXTReMe Tracker