Text field integer - string extraction in js

by Prabakaran 2012-07-30 14:31:59

<script type="text/javascript">
function d(val){

var str=val.replace(/[A-Za-z @!#$%^&*()~`/[]|\?>,:;<-]+/,"");
document.getElementById("info").value=str;
}
</script>
<input type='text' value='' size=50 onkeyup='d(this.value)' id='info'>
973
like
0
dislike
0
mail
flag

You must LOGIN to add comments