【发布时间】:2019-06-23 03:33:09
【问题描述】:
我有以下代码,验证码字段只需说 10 个字符。因为是长度似乎是无穷无尽的。
我希望验证码的网页字段只能说 7 个字符。
<div class=" col-sm-4 ">
<div id="myapp" ng-controller="subscribe_controller">
<h4 style="color:black;" >Subscribe</h4>
<form id="subscribe_01">
<h4>
<p ng-bind="msg2"></p>
<input id="email2" style="color:gray;" type="text" name="EMAIL" placeholder="Your Email Adddress" value="" ng-model="email2"></h4>
<input id="token2" class="w3-input w3-section" type="hidden" name="token2" value="<?php echo $token;?>" >
<p>Code :<input id="captcha" type="text" placeholder="" required name="captcha" value="" ng-model="captcha" length="7" aw-limit-
length="3"><p>
<button class="w3-button w3-black" ng-click="postData_subscribe()" id="buttoncontact_subscribe">Send To Subscribe</button></p>
</form>
</div
>
【问题讨论】:
-
我认为该属性是
maxlength而不仅仅是length。尝试将其更改为maxlength="7"。 -
是大小。谢谢