IE 9 jQuery not setting input value

后端 未结 1 1609
迷失自我
迷失自我 2021-01-16 08:46

my question is simple:

I have an input file field, and i want to limit it to only accept .GIFs via Jquery , and if the format is wrong, set the input value blank.

相关标签:
1条回答
  • 2021-01-16 09:19

    From IE8 it is readonly try:

    $("input[type='file']").replaceWith($("input[type='file']").clone(true));
    

    Picked from here : SO Anwser

    0 讨论(0)
提交回复
热议问题