1. check it here, you might need to change a bit:
http://www.ycode.com/
2. always use location.replace(..) to load new pages

解决方案 »

  1.   

    karma(无为) 侬系弄个赚得高级五星,教教俺吧!
      

  2.   

    http://lucky.myrice.com/temp/select.htm
      

  3.   

    我弄的一个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">
            &nbsp;<font style='background-color:#99FF55;color:#0000FF;'>MySQL&gt</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>
      

  4.   

    多谢karma(无为) 和各位热心朋友了!我看过www.ycode.com里的东东,
    正是我所想要的。为表谢意,其他朋友请到我另一张帖里领分吧