0
ChromeオートフィルではなくSafariで動作するフォームがあります。いくつかのアイデアが正しく、このオートフィルの作品を作るためにChromeオートフィルが有効になっていますが、入力しません
<div class="form-group row" style="padding-left: 5%; padding-right: 5%;">
<div class="input-group">
<span class="input-group-addon" id="firstnameicon"><i class="fa " aria-hidden="true"> </i><label for="firstname">First Name</label></span>
<input type="text" name="fname" id="firstname" placeholder="John" required="" autocomplete="given-name" class="form-control" style="position: relative;">
</div>
</div>
誰も:Webページ上で発生
Array.prototype.forEach.call(vars, function(variable) {
modal = modal + " \
<div class='form-group row' style='padding-left: 5%; padding-right: 5%;'> \
<div class='input-group'> \
<span class='input-group-addon' id='"+variable+"icon'><i class='fa "+icons[variable]+"' aria-hidden='true'> </i><label for='"+variable+"'>"+labels[variable]+"</label></span> \
<input type='"+types[variable]+"' name='"+names[variable]+"' id="+variable+" placeholder='"+placeholders[variable]+"' required autocomplete='"+autocomp[variable]+"' autocomplete='on' class='form-control' style='position: relative;'></input> \
</div> \
</div>";
});
HTMLコード:
Screen shot autofill suggestion
Screen shot after selected "Adriaan"
コードは、入力フィールドを生成するには?
ありがとうございます!
から取られたが、私は上書きされた「オン」にし、「上」= =「与えられた名」オートコンプリートオートコンプリートを書いて...だから、これは動作します!ありがとう! –