Useful Javascript Code

This function will remove any characters or punctuation which is not allowed in input.

<script language="javascript">
function test(){
var kwd = document.getElementById("kwd");
kwdv = kwd.value.replace(/[^\d\w\.\?\_\=\&\:\\]/g,'');
alert(kwdv);
}
</script>

<input type="text" value="" name="kwd" id="kwd" onblur="test()">
affiliate_link
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Comments are closed.