大上拉框过滤 Filtering Large Select Lists(GPL开源协议)
大下拉框过滤 Filtering Large Select Lists(GPL开源协议)
[url=http://www.barelyfitz.com/projects/filterlist/index.php/2]Filtering Large Select Lists
[/url]
[url=http://www.barelyfitz.com/projects/filterlist/index.php/2]Filtering Large Select Lists
[/url]
<html><head> <meta http-equiv="content-type" content="text/html; charset=GB2312"> <title>Filterlist Example</title> <!-- Load the javascript code --> <script type="text/javascript" src="example_files/filterlist.js"></script> </head> <body> <h1>Filterlist Example</h1> <form name="myform" action=""> <select name="myselect" size="5"> <option>Keanu Reeves </option><option>Laurence Fishburne </option><option>汉字 </option><option>汉语 </option><option>Nona Gaye </option><option>Lachy Hulme </option><option>Nathaniel Lees </option><option>Harry J. Lennix </option><option>Matt McColm </option><option>Carrie-Anne Moss </option><option>Collin Chou </option><option>Genevieve O'Reilly </option><option>Harold Perrineau Jr. </option><option>Jada Pinkett Smith </option><option>Adrian Rayment </option><option>Neil Rayment </option><option>Bruce Spence </option><option>Hugo Weaving </option><option>Lambert Wilson </option><option>Anthony Wong </option></select> <script type="text/javascript"> <!-- var myfilter = new filterlist(document.myform.myselect); //--> </script> <p> Filter: <a href="javascript:myfilter.reset()" title="Clear the filter">Clear</a> <a href="javascript:myfilter.set('^A')" title="Show items starting with A">A</a> <a href="javascript:myfilter.set('^B')" title="Show items starting with B">B</a> <a href="javascript:myfilter.set('^C')" title="Show items starting with C">C</a> <a href="javascript:myfilter.set('^D')" title="Show items starting with D">D</a> <a href="javascript:myfilter.set('^E')" title="Show items starting with E">E</a> <a href="javascript:myfilter.set('^F')" title="Show items starting with F">F</a> <a href="javascript:myfilter.set('^G')" title="Show items starting with G">G</a> <a href="javascript:myfilter.set('^H')" title="Show items starting with H">H</a> <a href="javascript:myfilter.set('^I')" title="Show items starting with I">I</a> <a href="javascript:myfilter.set('^J')" title="Show items starting with J">J</a> <a href="javascript:myfilter.set('^K')" title="Show items starting with K">K</a> <a href="javascript:myfilter.set('^L')" title="Show items starting with L">L</a> <a href="javascript:myfilter.set('^M')" title="Show items starting with M">M</a> <a href="javascript:myfilter.set('^N')" title="Show items starting with N">N</a> <a href="javascript:myfilter.set('^O')" title="Show items starting with O">O</a> <a href="javascript:myfilter.set('^P')" title="Show items starting with P">P</a> <a href="javascript:myfilter.set('^Q')" title="Show items starting with Q">Q</a> <a href="javascript:myfilter.set('^R')" title="Show items starting with R">R</a> <a href="javascript:myfilter.set('^S')" title="Show items starting with S">S</a> <a href="javascript:myfilter.set('^T')" title="Show items starting with T">T</a> <a href="javascript:myfilter.set('^U')" title="Show items starting with U">U</a> <a href="javascript:myfilter.set('^V')" title="Show items starting with V">V</a> <a href="javascript:myfilter.set('^W')" title="Show items starting with W">W</a> <a href="javascript:myfilter.set('^X')" title="Show items starting with X">X</a> <a href="javascript:myfilter.set('^Y')" title="Show items starting with Y">Y</a> <a href="javascript:myfilter.set('^Z')" title="Show items starting with Z">Z</a> </p><p> <!-- Note: if you have a very large select list, you should deactivate the real-time filtering on the INPUT field below - remove the onKeyUp attribute. --> Filter by regular expression:<br> <input name="regexp" onkeyup="myfilter.set(this.value)"> <input onclick="myfilter.set(this.form.regexp.value)" value="Filter" type="button"> <input onclick="myfilter.reset();this.form.regexp.value=''" value="Clear" type="button"> <br> <input name="toLowerCase" onclick="myfilter.set_ignore_case(!this.checked)" type="checkbox"> Case-sensitive </p></form> </body></html>