Why my Regular Expression Replace function is not working on server?

Below is a piece of code of my data entry page:


<script type=“text/javascript”>
function replaceRegHtm(){
var patt1=new RegExp("’", “gi”);
var formTxt = document.dbform.d_text.value;

alert(formTxt.replace(patt1, “0”));
<form name=“dbform”>
<textarea name=“d_text”>Shocking and amazing families for years, Ripley’s Believe It or Not! Museum houses an impressive collection of odd, strange, and unbelievable artifacts from around the world. Spend as little as an hour, or as much as an entire day browsing through and interacting with over 700 exhibits, oddities, curriosities, and illusions at Ripley’s Believe It or Not!</textarea>
<input type=“button” value=“check” onclick=“replaceRegHtm()” />

This code works very well when i test it on local machine but not works when i use same code on the server. Javascript is enabled at server. :sc: