http://lucky.myrice.com/temp/combobox.htm
解决方案 »
- 打破砂锅问到底,Close()和Dispose()的深入理解
- 关于Ajax的UpdatePanel的设置问题
- asp.net网站出现404错误后跳到指定页面(顶者有分)
- |M| 学习URL重写:求一个URL重写的示例地址下载 谢谢
- 在使用吴旗娃的控件时,pager.CurrentPageIndex的值总是为零
- 心急如焚,在线等各位高人帮助~!!拜谢拜谢!!
- 怎么在ascx控件代码下加入可以弹出警告框的代码啊?
- 怎样解决aspnet_wp.exe进程占内存的问题
- 开源论坛Stella的BUG列表
- asp.net处理大表单
- 紧急!关于根据给定条件,动态生成弹出式窗口的问题
- 如何精确的控制在线用户列表的显示??如何在.aspx页面的html代码里面写关闭窗口的事件??
<script language="JavaScript">
<!--
function catch_keydown(sel)
{
switch(event.keyCode)
{
case 13:
//Enter;
sel.options[sel.length] = new Option("","",false,true);
event.returnValue = false;
break;
case 27:
//Esc;
alert("text:" + sel.options[sel.selectedIndex].text + ", value:" + sel.options[sel.selectedIndex].value + ";");
event.returnValue = false;
break;
case 46:
//Delete;
if(confirm("删除当前内容?"))
{
sel.options[sel.selectedIndex] = null;
if(sel.length>0)
{
sel.options[0].selected = true;
}
}
event.returnValue = false;
break;
case 8:
//Back Space;
var s = sel.options[sel.selectedIndex].text;
sel.options[sel.selectedIndex].text = s.substr(0,s.length-1);
event.returnValue = false;
break;
}
}function catch_press(sel)
{
sel.options[sel.selectedIndex].text = sel.options[sel.selectedIndex].text + String.fromCharCode(event.keyCode);
event.returnValue = false;
}
//-->
</script>
<select name=s1 onkeydown="catch_keydown(this);" onkeypress="catch_press(this);" style="font-size:12px;"><option>---</option></select>
<BR>可以编译的下拉框
</body>