[email protected]
JAVA SCRIPT: การตรวจสอบการป้อนข้อมูล
การตรวจสอบการกรอกข้อมูล โดยถ้าไม่กรอกข้อมูลจะไม่เก็บข้อมูลเข้าจะต้องกรอกให้ครบถึงทำงาน
Script Files
<!script language="JavaScript"> <!-- function Validator(theForm) { if (theForm.User.value == "") { alert("Please enter a value for the \"User\" field."); return (false); } return (true); } //--> </script>
Form Script
<form name="form1" method="POST" action="" onSubmit="return Validator(this)"> <input name="User" type="text" maxlength="5"> <input type="submit" name="Submit" value="login"> <input type="reset" name="Reset" value="Reset"> </form>
สร้างเมื่อวันที่ : 18-07-2548