我做了个搜索功能是这样的
<!-- 搜索 -->
<script type="text/javascript" language="javascript">
function query()
{
var text = $("#textInfo").val();
//content = rtrim(content);
if(text=='关键词搜索'||$.trim(text).length==0)
{
return ;
}else
{
window.location.href="TibleSearchAction?text="+encodeURI(encodeURI(text));
}
}
</script>
<!-- end -->
<input id="textInfo" name="text" type="text" value="输入关键字搜索新闻标题" onfocus="this.value=''" style="width:150px; margin-right:5px" maxlength="20" />
<input type=button value="" style="background:url(<%=basePath%>HTML/images/go.jpg); width:40px;height:22px;" onclick="query();">
我在文本框输入后 按下回车键相当于提交按钮呢 要改什么又在哪改??