所需的属性似乎不适用于公司和电话。它只适用于姓名和电子邮件。任何人都可以帮我吗?
<form>
<input type="text" name="name" value="" placeholder="Name" required />
<input type="text" name="company" value="" placeholder="Company" required />
<input type="text" name="email" value="" placeholder="Email" required />
<input type="text" name="phone" value="" placeholder="Phone" required />
<br />
<div onclick="catalog_popup_submit();"
class="button">Continue</div>
</form>
&#13;
答案 0 :(得分:1)
问题在于
<div onclick="catalog_popup_submit();"
class="button">Continue</div>
尝试在表单中添加提交按钮。
<html>
<body>
<form>
<input type="text" name="name" value="" placeholder="Name" required />
<input type="text" name="company" value="" placeholder="Company" required />
<input type="email" name="email" value="" placeholder="Email" required />
<input type="text" name="phone" value="" placeholder="Phone" required />
<br />
<input type="submit" value="continue" />
</form>
</body>
</html>
<html>
<body>
<form>
<input type="text" name="name" value="" placeholder="Name" required />
<input type="text" name="company" value="" placeholder="Company" required />
<input type="text" name="email" value="" placeholder="Email" required />
<input type="text" name="phone" value="" placeholder="Phone" required />
<br />
<input type="submit" value="continue" />
</form>
</body>
</html>
答案 1 :(得分:1)
<form>
<input type="text" name="name" value="" placeholder="Name" required />
<input type="text" name="company" value="" placeholder="Company" required />
<input type="email" name="email" value="" placeholder="Email" required />
<input type="text" name="phone" pattern="[1-9]{1}[0-9]{9}" placeholder="Phone" title="Enter 10 digit mobile number"required />
<input type="submit" value="continue" />
</form>
&#13;