Why does the javascript onchange event not fire if autocomplete is on?

前端 未结 6 1023
误落风尘
误落风尘 2020-11-27 20:26

I have a textbox with an onchange event. Why does this event not fire when the user uses the autocomplete feature to populate the textbox?

I am working with Internet

6条回答
  •  渐次进展
    2020-11-27 20:33

    I just turn Autocomplete off for the text boxes I need to fire a text change event

    'Turn off Auto complete 
    '(it needs to fire the text change event)
     txtYourTextBox.Attributes.Add("AutoComplete", "off")
    

    Just put that in the page load.

    Alternately, you can add the attribute to your markup on the input element or the entire form:

    
    

    or

提交回复
热议问题