/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/**** VALIDATE IMAGE ***/ function validateImageFile(fld_value) { if(!/(\.bmp|\.gif|\.jpg|\.jpeg)$/i.test(fld_value)) { //alert("Invalid image file type."); //fld.form.reset(); //fld.focus(); return false; } return true; }