ajax或者隐藏的iframe或者
<input type="text" name="username" onblur="toJsp(this.value)"/>
<script>
function toJsp(v)
{
if(v!="")//值不为空时才打开新页面传递值
  window.open("xxx.jsp?username="+v);
}
</script>

解决方案 »

  1.   

    谢谢楼上的,不知道我这样写对不?
    function get(){document.form.username.value;}<form><input type=button name=username onclick="get()" /></form>
       
      

  2.   

    什么意思??你的get函数一点意思都没有啊,又没有返回值
    <script>
    function   get()
    {window.open("xxx.jsp?username="+document.form.username.value);} 
    </script>
    <form name="form1"> <input   type=button   name=username   onclick="get()"  value="aa" /> </form> 
      

  3.   

    <script>
    function   get()
    {
    //以后给控件或者表单命名时不要和dom中一些默认的对象名称相同,要不有可能发生其他的错误.
    window.open("xxx.jsp?username="+document.form1.username.value);

    </script>
    <form name="form1"> <input   type=button   name=username   onclick="get()"  value="aa" /> </form>