代码实例:
test.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>s</title>
</head>
<body>
<form action="test1.html">
请输入正确内容
<input pattern="[a-z]{3}" name="test">
<input type="submit">
</form>
</body>
</html>
test1.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>s</title> </head> <body> 这是一个测试 </body> </html>
效果:
2017-09-02 23:24:02