2017-12-17 11 views
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">&nbsp;</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'>&nbsp;</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"

コードは、入力フィールドを生成するには?

ありがとうございます!

答えて

0

autocomplete="given-name"の代わりにautocomplete="on"を生成しようとしましたか?

ソースは[OK]を、はい、私は私が前に試したと思っ[w3school][1]

+0

から取られたが、私は上書きされた「オン」にし、「上」= =「与えられた名」オートコンプリートオートコンプリートを書いて...だから、これは動作します!ありがとう! –

関連する問題