field-url
表单 人会在里面打字的字段,处于真实表单会让它们出现的状态。每一个都放在带内边距的 rst-box 里,因为表单就放在这样的卡片里。
网址输入框,example.com 带不带 https:// 都可以。读取表单的一方要自己补上协议并检查地址。
每个示例都能真实操作,但其中的链接不会跳转到任何地方。 HTML 显示可复制的标记。
最简
把这段放进 <section rst-box><form rst-form> 里。
<div rst-field >
<label rst-field-label for ="fu_bare" >网站</label >
<input rst-input id ="fu_bare" name ="fu_bare" type ="text" inputmode ="url" autocomplete ="url" autocapitalize ="none" autocorrect ="off" spellcheck ="false" >
</div >
带一条提示
把这段放进 <section rst-box><form rst-form> 里。
<div rst-field >
<label rst-field-label for ="fu_hint" >公司网站</label >
<input rst-input id ="fu_hint" name ="fu_hint" type ="text" inputmode ="url" autocomplete ="url" autocapitalize ="none" autocorrect ="off" spellcheck ="false" aria-describedby ="fu_hint-hint" >
<small rst-field-hint id ="fu_hint-hint" >可以省略 https。</small >
</div >
带一个错误
把这段放进 <section rst-box><form rst-form> 里。
<div rst-field >
<label rst-field-label for ="fu_error" >网站</label >
<input rst-input id ="fu_error" name ="fu_error" type ="text" inputmode ="url" autocomplete ="url" autocapitalize ="none" autocorrect ="off" spellcheck ="false" value ="brightwater" aria-invalid ="true" aria-describedby ="fu_error-error" >
<small rst-field-error id ="fu_error-error" >请输入网址,例如 example.com。</small >
</div >