gpt4 book ai didi

html - maxlength 和 minlength 不验证 IE 中的 HTML 文本框

转载 作者:太空宇宙 更新时间:2023-11-04 16:20:43 27 4
gpt4 key购买 nike

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<form>
<input type="text" placeholder="Mobile Number" required="" style="width: 263px;" maxlength="10" minlength="10">
<input type="submit">
</form>
</body>
</html>

我试图通过使用 maxlengthminlength CSS 属性来限制文本框验证,它在 IE 中不起作用(尽管在其他浏览器上起作用)。

最佳答案

看起来 minlength is not supportedmost current browsers .有一个很有前途的解决方法 here你可以尝试使用。使用 maxlength 和解决方法,您的代码应该可以工作。

关于html - maxlength 和 minlength 不验证 IE 中的 HTML 文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29514271/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com