inf : http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_required
<!DOCTYPE html>
<html>
<body>
<form action="demo_form.asp">
Username: <input type="text" name="usrname" required>
<input type="submit">
</form>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
</body>
</html>
沒有留言:
張貼留言