<style>
body {font-size:9pt;font-family:verdana;}
button {cursor:hand;border:1px solid black;font-family:arial;font-size:9pt;}
a {color:red;}
a:hover {color:blue}
</style>
</head>
<body>
<script src="combox.js"></script>
<script>
function SubmitThisForm()
{
document.form1.comboxvalue.value=dm.value;
//alert(document.form1.comboxvalue.value);
var fpath="";
var post="";
fpath="jiecheng.asp";
post="post";
document.form1.action=fpath;
document.form1.method=post ;
form1.submit;
return true;
}
</script>
<br><br><br>
<form name="form1" onsubmit="SubmitThisForm()">
<button hidefocus onClick="alert(dm.value)">Show Value</button> <button hidefocus
onClick="dm.add(new ComboBoxItem(window.prompt('Type in the text to add',''),window.prompt('Type in a value to add','')))"
>Add Item</button> <button hidefocus onClick="dm.remove(window.prompt('Type in an index to remove',''))"
>Remove Item</button>
<br>
<input name="comboxvalue" type="hidden" id="comboxvalue">
<br>
<input type="submit" name="Submit" value="按钮">
</form>
/*
* ComboBox
* By Jared Nuzzolillo
*
* Updated by Erik Arvidsson
* http://webfx.eae.net/contact.html#erik
* 2002-06-13 Fixed Mozilla support and improved build performance
*
*/
Global_run_event_hook = true;
Global_combo_array = new Array();
var tmp = document.createElement("BUTTON");
tmp.appendChild(document.createTextNode(6));
tmp.className = "combo-button";
this.view.appendChild(tmp);
tmp.onfocus = function () { this.blur(); };
tmp.onclick = new Function ("", this.name + ".toggle()");
}
function ComboBox_choose(realval,txtval)
{
this.value = realval;
var samstring = this.name+".view.childNodes[0].value='"+txtval+"'"
window.setTimeout(samstring,1)
this.valcon.value = realval;
}
function ComboBox_mouseDown(e)
{
var obj,len,el,i;
el = e.target ? e.target : e.srcElement;
while (el.nodeType != 1) el = el.parentNode;
var elcl = el.className;
if(elcl.indexOf("combo-")!=0)
{
<style>
body {font-size:9pt;font-family:verdana;}
button {cursor:hand;border:1px solid black;font-family:arial;font-size:9pt;}
a {color:red;}
a:hover {color:blue}
</style>
</head>
<body>
<script src="ComboBox.js"></script>
<script>
dm=new ComboBox("dm")
dm.add(
new ComboBoxItem("barge",1),
new ComboBoxItem("benluc",2),
new ComboBoxItem("benlieeeeck",3),
new ComboBoxItem("taco",4)
)
/*
// generate 1000 more to test performance
for (var i = 0; i < 100; i++ )
dm.add(new ComboBoxItem(String(i)));
*/
</script>
<br><br><br>
<button hidefocus onClick="alert(dm.value)">Show Value</button> <button hidefocus
onClick="dm.add(new ComboBoxItem(window.prompt('Type in the text to add',''),window.prompt('Type in a value to add','')))"
>Add Item</button> <button hidefocus onClick="dm.remove(window.prompt('Type in an index to remove',''))"
>Remove Item</button>
<br>
<br>
<select>
<!--BeginSelect-->
<option value={ID}>{Value}</Option>
<!--EndSelect-->
</select>
in asp Page,make a function to find <!--Begin and <!--End
then let the code to show multiple
i have code, if you need ,you can send me a message