我有一个无法让 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>