Teensweb
New Member
- Messages
- 352
- Reaction score
- 1
- Points
- 0
I have a js for a form validation
Now what I need is: The border it draws is of zero padding that is, it covers my input also. I wanna set a padding to it so that it keeps 1 px distance from the input.
HTML:
<script type=text/javascript>
function validate_form ( )
{
valid = true;
if ( document.form1.file_name.value == "" )
{
document.form1.file_name.style.border = '2px solid #ff0000';
document.form1.file_name.focus();
valid = false;
}
return valid;
}
</script>
Last edited: