首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >html input 必填字段

html input 必填字段

作者头像
kirin
发布于 2020-11-11 12:43:48
发布于 2020-11-11 12:43:48
2.3K0
举报
文章被收录于专栏:Kirin博客Kirin博客

下面是参考代码

代码语言:javascript
复制
<!DOCTYPE HTML>
 <html>
 <body>
<form action=”/example/html5/demo_form.asp” method=”get”>
 Name: <input type=”text” name=”usr_name”
oninput=”setCustomValidity(”);” required oninvalid=”setCustomValidity(‘Please enter the username’);”
/>
 <input type=”submit” value=”提交” />
 </form>
</body>
 </html>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/11/08 ,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档