2017-10-17 165 views
0

我正在編寫一個PHP網站。我的問題真的在個人資料頁面上。自動填寫將我的電子郵件地址放在我輸入街道地址的地方。這是我的意思的圖像。Chrome自動填充正在填寫錯誤的文本輸入

Auto-Fill Image

<input type="text" name="txtstreetaddress" id="txtstreetaddress" placeholder="Street Address" tabindex="6" value="<?php echo $address ?>" style="font-family: 'Ubuntu';margin-top: -30px;font-size: 14px;height: 30px;width: 280px;" autocomplete="off" value=""> 

我也有表設置爲自動完成= 「關閉」

+0

有你確信您的Chrome個人資料中的自動填充信息是否正確? – aynber

+0

您正在設置'value =「<?php echo $ address?>」'這可能是您的*電子郵件地址* - 地址 – kerbholz

回答

0

你必須使用autocomplete="false",而不是 「關」。

如果仍然不能正常工作(我不希望),你可以處理它通過把兩個假字段在表單像下面的人的開頭:

<input style="display:none" type="text" name="fakeusernameremembered"/> 
<input style="display:none" type="password" name="fakepasswordremembered"/> 
+0

根據https://www.w3.org/wiki/HTML/Elements/input/text它是'自動完成=開/關/默認' – kerbholz

+0

複選:你說得對!對問題做了一些進一步的調查:這不是關於自動完成。上圖中發生的事情是chromes autofill,它不受autocomplete =「off」的影響。假的領域似乎是目前唯一的解決方法。 –