<script>

function sto(){


//var url="result.jsp?search="+search.value;//此语句就是出问题的所//在,下面是修改后可以实现的:

var url="result.jsp?search="+ document.getElementById("search").value;


window.location.url;< /span>

}  

</script>

 <body>

 请输入:

 <input type="text" name="search" id="search"/>


 <a javascript:sto()>搜索< /a>

 </body>