简体   繁体   中英

onchange form submit not displaying result in IE9

In the select option, I used onChange form submit like below:

<form name="onchange" method="post" action="samepage.jsp">
    <select name="n1" onchange="document.onchange.submit()">
    <option value="A">A</option>
    <option value="B">B</option>
    </select>
</form>

After selecting an option, I can get the parameter of select option then I can use that parameter to get user names from database and all data will display at same page. It is working fine at eclipse but not showing user name (database values) in Internet Explorer. It is displaying blank. I want to display names without submit button.

尝试:

document.forms['onchange'].submit();

尝试

document.getElementsByName('onchange')[0].submit();

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