有谁有比较好的能模仿组合框的select控件?? 1. check it here, you might need to change a bit:http://www.ycode.com/2. always use location.replace(..) to load new pages 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 karma(无为) 侬系弄个赚得高级五星,教教俺吧! http://lucky.myrice.com/temp/select.htm 我弄的一个MySQL查询,功能类似,你看可以否:<html><head><title>MySQL查询</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body><table width="625" height="95%" border="0" align="center" bgcolor="#FFCC00"> <tr> <td height="95%" bgcolor="#FFFF00" align="center"> <div id=result style="position:relative;width:100%;height:100%;overflow:scroll;"></div> </td> </tr> <tr> <form name="MySQL" method="post" action="sqlsubmit.php" target="_submit"> <td bgcolor="#FFFF00" align="left"> <input type="hidden" name="cur_db" style="display:none;"> <input type="hidden" name="is_history" style="display:none;" value="1"> <font style='background-color:#99FF55;color:#0000FF;'>MySQL></font><input type="text" name="query" size="75%" onkeydown="edit_input();" style="width:90%;"> </td></form> </tr></table><script langugage="JavaScript">function on_submit(){ if(MySQL.query.value=="") return false; else if(MySQL.query.value=="cls") { document.all.result.innerHTML=""; MySQL.query.value=""; document.all.result.scrollTop=0; return false; } else { MySQL.is_history.value=0; if(MySQL.query.value!=_history[_history.length-1]) { _history[_history.length]=MySQL.query.value; cur_index=_history.length; MySQL.is_history.value=1; } else cur_index=_history.length; return true; }}MySQL.onsubmit=on_submit;cur_value="";function edit_input(){ if(window.event.keyCode==40) { if(MySQL.query.value!=_history[cur_index]) cur_value=MySQL.query.value; if(cur_index<_history.length) cur_index++; if(cur_index==_history.length) { MySQL.query.value=cur_value; MySQL.query.select(); } else MySQL.query.value=_history[cur_index]; } if(window.event.keyCode==38) { if(MySQL.query.value!=_history[cur_index]) cur_value=MySQL.query.value; if(cur_index>0) cur_index--; else cur_index=0; MySQL.query.value=_history[cur_index]; } if(window.event.keyCode==27) { cur_index=_history.length; MySQL.query.value=""; } MySQL.query.focus();}_history=new Array( "select * from guest", "select * from visit limit 0,10;");var cur_index=_history.length;MySQL.query.focus();function _focus(){ MySQL.query.focus();}window.onfocus=_focus;function result_blur(){ if(window.event.keyCode<37 || window.event.keyCode>40) MySQL.query.focus();}document.all.result.onkeydown=result_blur;</script></body></html> 多谢karma(无为) 和各位热心朋友了!我看过www.ycode.com里的东东,正是我所想要的。为表谢意,其他朋友请到我另一张帖里领分吧 怎么获取网页正文内容宽度,求高手 问个经验性的问题,表单验证的 jquery增加删除按钮的问题~~ 如何让div只能输入0-100的数字? 关于时间问题,谢谢帮忙 请教:来来来,进来看,描述不清楚 用框架做的页面,框架分上,左,右三部分,想点击左侧的按钮在右侧显示不同的页面。如何做的。。。急。。在线等待 如何限制图片宽度?请高手看过来。--马上结帖! fso对象的问题。 datalist实现图片滑过时放大 jquery代码 如何判断网页中某一个图片是否存在?在线等待!!! 我想用javascriopt做一个浏览器以取代IE,并且去掉右上角的几个按钮,有这个可能吗?
<html>
<head>
<title>MySQL查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<table width="625" height="95%" border="0" align="center" bgcolor="#FFCC00">
<tr>
<td height="95%" bgcolor="#FFFF00" align="center">
<div id=result style="position:relative;width:100%;height:100%;overflow:scroll;"></div>
</td>
</tr>
<tr>
<form name="MySQL" method="post" action="sqlsubmit.php" target="_submit">
<td bgcolor="#FFFF00" align="left">
<input type="hidden" name="cur_db" style="display:none;">
<input type="hidden" name="is_history" style="display:none;" value="1">
<font style='background-color:#99FF55;color:#0000FF;'>MySQL></font><input type="text" name="query" size="75%" onkeydown="edit_input();" style="width:90%;">
</td>
</form>
</tr>
</table>
<script langugage="JavaScript">
function on_submit()
{
if(MySQL.query.value=="")
return false;
else
if(MySQL.query.value=="cls")
{
document.all.result.innerHTML="";
MySQL.query.value="";
document.all.result.scrollTop=0;
return false;
}
else
{
MySQL.is_history.value=0;
if(MySQL.query.value!=_history[_history.length-1])
{
_history[_history.length]=MySQL.query.value;
cur_index=_history.length;
MySQL.is_history.value=1;
}
else
cur_index=_history.length;
return true;
}
}
MySQL.onsubmit=on_submit;
cur_value="";
function edit_input()
{
if(window.event.keyCode==40)
{
if(MySQL.query.value!=_history[cur_index])
cur_value=MySQL.query.value;
if(cur_index<_history.length)
cur_index++;
if(cur_index==_history.length)
{
MySQL.query.value=cur_value;
MySQL.query.select();
}
else
MySQL.query.value=_history[cur_index];
}
if(window.event.keyCode==38)
{
if(MySQL.query.value!=_history[cur_index])
cur_value=MySQL.query.value;
if(cur_index>0)
cur_index--;
else
cur_index=0;
MySQL.query.value=_history[cur_index];
}
if(window.event.keyCode==27)
{
cur_index=_history.length;
MySQL.query.value="";
}
MySQL.query.focus();
}
_history=new Array(
"select * from guest",
"select * from visit limit 0,10;");
var cur_index=_history.length;
MySQL.query.focus();function _focus()
{
MySQL.query.focus();
}
window.onfocus=_focus;function result_blur()
{
if(window.event.keyCode<37 || window.event.keyCode>40)
MySQL.query.focus();
}
document.all.result.onkeydown=result_blur;
</script>
</body>
</html>
正是我所想要的。为表谢意,其他朋友请到我另一张帖里领分吧