Hi All,
I am using the following code to remove white spaces at the beginning of txt box.if i change textbox name it doesnot work.
Please Someone help.
<script>
//Javascript
function white_space(field)
{
field.value = (field.value).replace(/^\\s*/g,'');
}
</script>
//example HTML
<form action="" method="get" name="test_form">
<input type="text" name="text" onKeyPress="white_space(text)" />
<input type="button" name="button" value="button" />
</form>