Text box not getting reset

后端 未结 4 1923
没有蜡笔的小新
没有蜡笔的小新 2021-01-21 23:47

I have a text box and I tried to reset it after a button click. But it is not getting reset. HTML Script:-

    

        
4条回答
  •  长发绾君心
    2021-01-22 00:11

    The trouble you are facing here is that you are trying to clear the input box with id inp while calling pre-selected-options, which isn't connected to your text box.

    Using document.getElementById('inp').value = "" should clear the value of your textbox.

提交回复
热议问题