4

我試圖在兼容模式下隱藏IE10內的輸入清除按鈕。Internet Explorer 10 :: - 兼容模式下的ms-clear

我已經使用這個:

input[type=text]::-ms-clear, input[type=text]::-ms-reveal { 
    display: none; 
} 

這適用於IE10的標準模式,但不兼容模式。

任何想法我可以做到這一點?有什麼方法可以使用JavaScript禁用它?

+0

我在相同的位置。在兼容模式下,我需要修復IE10和IE11。有一個錯誤提交了IE團隊的回覆,因爲無法修復:http://connect.microsoft.com/IE/feedback/details/783743/disable-ie10-clear-field-button-when-rendering-in -compatibility-mode – robabby

+0

在這方面有什麼進展? – Jules

回答

2

我知道這不是您可能正在尋找的答案,但微軟表示,這是「按設計」和「是瀏覽器的一項功能」,無法解決問題。

http://connect.microsoft.com/IE/feedback/details/783743/disable-ie10-clear-field-button-when-rendering-in-compatibility-mode

產品團隊認爲,根據其預期 設計這個項目的工作。

有人嘗試設置與line-height: 0; height: 0; padding: 8px; padding-bottom: 8px;某種程度的成功按照以下職位:

How to remove clear button ('X' button) from IE10 textboxes in compatibility mode?

+0

「爲什麼我討厭微軟」名單上的另一個勾號。 – user2867288