简体   繁体   中英

HTML - Refresh form fields - different behavior in IE and Phone-android

I have a form with a list box and several text boxes (input tags). When a user selects an item in the listbox I prepopulate the text in the text boxes. This is done in a function that executes in the listbox's onclick event. In IE running on the desktop everything runs as expected. On the browser running on an android phone here is what happens: 1 - first selection - text boxes remain blank 2 - next selection - text boxes get populated with the previous selection 3 - any further selection populates the text boxes with the previous selection.

Why the difference?

Thanks

This is fixed now. I replaced the onclick event on the list box with onchange and it works as expected on all browsers I tried.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM