Home  >  Article  >  Web Front-end  >  input select(multiple) implements drop-down box input value_javascript skills

input select(multiple) implements drop-down box input value_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:52:341708browse

So I tried to use input select to achieve it, and the results are as follows:


Detailed code and demonstration address: www.homdian.com/test.aspx

This method actually presses a text box on the drop-down box, which can realize input and selection of the drop-down box. But when binding the drop-down box options asynchronously based on the input value,

Unable to expand the drop-down box, I found a piece of code online:

Copy the code The code is as follows:

document.form1.ddlMovName.focus();
var WshShell = new ActiveXObject("Wscript.Shell");
try{
WshShell.SendKeys("%{DOWN}");
}
catch(e){}
WshShell.Quit;

The above paragraph can expand the drop-down box, but the following prompt will pop up (test environment IE7)

It feels unfriendly, so it’s useless. So I tried to use input select(multiple), the effect is as follows:

Detailed code and demonstration address: www.homdian.com/test1.aspx

This method basically meets my needs, so I post it here in the hope that everyone can provide a better method. Thanks.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn