0
我同意這個問題有很多答案。如何從輸入type =「text/search」控件中刪除'X'
如:
等等,但已經嘗試了所有這些,但我還是無法從刪除 「X」輸入字段。
我剛剛創建簡單的輸入控制:
<input type="text" id="RemoveX" />
這裏是我的CSS:
input[type=text]::-ms-clear { display: none; width : 0; height: 0; }
input[type=text]::-ms-reveal { display: none; width : 0; height: 0; }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }
#RemoveX::-ms-clear { display: none; width : 0; height: 0; }
#RemoveX::-ms-reveal { display: none; width : 0; height: 0; }
#RemoveX::-webkit-search-decoration,
#RemoveX::-webkit-search-cancel-button,
#RemoveX::-webkit-search-results-button,
#RemoveX::-webkit-search-results-decoration { display: none; }
我使用IE 11,並用兼容模式一切檢查被罰款,我沒有測試此在任何瀏覽器中(因爲我不需要),我只想從IE 10+瀏覽器的輸入字段中刪除X。
任何幫助將不勝感激。