Javascript Replace a string javascript August 20, 2012 Pramod T P <script type=”text/javascript”> var string=”PHPCode”; string=string.replace(“Code”,”Codez”); alert(string); </script>