Remove IE10's “clear field” X button on certain inputs?

前端 未结 6 2341
故里飘歌
故里飘歌 2020-11-22 15:51

It\'s a useful feature, to be sure, but is there any way to disable it?
For instance, if the form is a single text field and already has a \"clear\" button beside it, it

6条回答
  •  暖寄归人
    2020-11-22 16:22

    I think it's worth noting that all the style and CSS based solutions don't work when a page is running in compatibility mode. The compatibility mode renderer ignores the ::-ms-clear element, even though the browser shows the x.

    If your page needs to run in compatibility mode, you may be stuck with the X showing.

    In my case, I am working with some third party data bound controls, and our solution was to handle the "onchange" event and clear the backing store if the field is cleared with the x button.

提交回复
热议问题