我有一张表单,我无法将Chrome设置为自动填充。虽然有3个输入正在填充..
电话号码,电子邮件和公司名称都可以正常运行。我尝试将x-autofilltype添加到其他字段但没有任何反应。还有比这更好的方法吗?
这是我的代码的一部分(注意这是来自我的php的html):
<div class="checkout_holder">
<div class="contentText">
<div class="checkout_float_left">
<input type="text" name="email" value="E-Mail" style="width:295px;" title="E-Mail" />
</div>
<div class="checkout_float_left">
<input type="text" name="phone" value="Phone Number" style="width:295px;" title="Phone Number" /> </div>
</div>
</div><!-- eof contact info -->
<div class="checkout_holder">
<h2 class="checkout">Billing Address</h2>
<div class="contentText">
<div class="checkout_float_left">
<select name="bill_country_id" style="width:301px;border:1px solid #bbb;">
<option value="0">Please Select Your Country</option>
<option value="1">Afghanistan</option>
etc.
</select>
</div>
<div class="checkout_float_left">
<input type="text" name="bill_firstname" value="First Name" style="width:140px;" title="First Name" x-autocompletetype="given-name" />
</div>
<div class="checkout_float_left">
<input type="text" name="bill_lastname" value="Last Name" style="width:140px;" title="Last Name" />
</div>
<div class="checkout_float_left">
<input type="text" name="bill_company" style="width:295px;color:#bbb;" placeholder="Company" title="Company" />
</div>
<div class="checkout_float_left">
<input type="text" name="bill_address" value="Street Address" style="width:295px;" title="Street Address" />
</div>
<div class="checkout_float_left">
<input type="text" name="bill_address2" style="width:295px;color:#bbb;" placeholder="Apt, Suite, etc" title="Apt, Suite, etc" />
</div>
<div class="checkout_float_left">
<input type="text" name="bill_city" value="City" style="width:295px;" title="Postcode" />
</div>
<div class="checkout_float_left" id="states">
<select name="bill_state" style="width:301px;border:1px solid #bbb;padding:2px 0;" id="bill_state">
<option value="0" SELECTED>Please Select Your State</option>
<option value="Alberta">Alberta</option>
</select>
</div>
<div class="checkout_float_left">
<input type="text" name="bill_postcode" value="Postcode" style="width:295px;" title="Postcode" />
</div>
</div><!-- eof contentText -->
</div>
答案 0 :(得分:-1)
如果我没记错,Chrome的自动填充按类型或名称匹配字段,就像我们在阅读时使用上下文线索一样。尝试将您的字段从bill_ *重命名为*。即bill_firstname - &gt;姓名