Javascript-Remove Comma from the given user's string.

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
  2. <html>  
  3.    <head>  
  4.       <title>Sample Code</title>  
  5.       <script type="text/javascript">  
  6.          function DeleteComma(MyString)           
  7.          {           
  8.                 //Replace Comma By Null....           
  9.                 var afterreplace=MyString.replace(',','');           
  10.                 alert(afterreplace);          
  11.          }           
  12.       </script>  
  13.    </head>  
  14.    <body bgcolor=#00ff00 alink=blue vlink=blue>  
  15.       <FORM name="windowEvent">  
  16.          Enter String : <input type="text" name="txtOriginal" /><br>  
  17.          <input type="button" value="Remove Comma" name="btnRemoveComma" onClick="DeleteComma(txtOriginal.value);" />  
  18.       </FORM>  
  19.    </body>  
  20. </html>