remove special characters from a string using java script
suppose if i enter text in text box.IF i clicl ok button.
text should be contain only chararacters and numbers, reaming should be remove(eg:$%^&*() special charcters).
how to write code using java script.
eg:
input string
揌ello%Wor;ld?
?Piano!!!!!!!?
? Hi5&*^%# ?br>
but output should be like this
揌elloWorld?
揚iano?
揌i5?
[402 byte] By [
6666a] at [2007-10-2 10:21:23]

use this code effectively..u wil make it
<script language="JavaScript"><!--
var temp = new String('This is a test string... So? What...');
document.write(temp + '<br>');
temp = temp.replace(/[^a-zA-Z 0-9]+/g,'');
document.write(temp + '<br>');
//--></script>
gud luck
aleens
> hi
>
> u r given code working fine.
> Thanks
Ok, good for you.
Are you now going to post in all your other thread that you've found an answer?
Others might spend time in one of your other threads to answer you, while you don't need it anymore.