我不明白。表单验证怎么不起作用?
代码编辑
<form action="https://s1368768478.t.eloqua.com/e/f2" id="form103" method="post" name="prenumerera">
<input name="elqFormName" type="hidden" value="prenumerera">
<input name="elqSiteId" type="hidden" value="1368768478">
<input name="elqCampaignId"type="hidden">
<label for="field0"></label>
<input id="email" name="email" placeholder="E-postadress" required="" type="email" value="">
<input id="field1" name="site" type="hidden" value="1">
<button value="Submit">Prenumerera</button>
</form>
http://www.sitepoint.com/html5-form-validation/
修改
我需要将输入作为电子邮件地址,如果不是这样,则会给出错误消息。
答案 0 :(得分:1)
你需要一个提交按钮和一个有效的表格..
<form name="loginForm">
<input type="email" name="email" id="email" required/>
<input type="submit" value="save" />
</form>
试试这个......