源代码:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <form action="demo-form.php"> Email: <input type="text" name="email"><br> Country: <input type="text" name="country" value="Norway" readonly><br> <input type="submit" value="提交"> </form><hr> <form action="demo-form.php"> Username: <input type="text" name="usrname" required> <input type="submit"> </form> <p><strong>注意:</strong> Internet Explorer 9及更早 IE 版本,或 Safari 不支持 input 标签的 required 属性。</p> </body> </html>
运行结果:
Fmpq工具