<!DOCTYPE html> <html> <body> <form action="demo_form.php" method="get"> Country code: <input type="text" name="country_code" pattern="[A-z]{3}" title="Three letter country code" /> <input type="submit" /> </form> </body> </html>
结果:
编辑上面的代码,点击查看结果。
yige.org
- 试一个