当前位置: 代码迷 >> Java Web开发 >> java初学者 送分 小疑点
  详细解决方案

java初学者 送分 小疑点

热度:196   发布时间:2016-04-16 21:57:07.0
java菜鸟 送分 小问题
<!-- 搜索 -->
<script>
function query()
{
var text = $("#textInfo").val();
//content = rtrim(content);
if(text=='关键词搜索'||text.trim().length==0)
{

return;
}else
{
/* location.href="TibleSearchAction"; */
window.location.href="TibleSearchAction?text="+encodeURI(encodeURI(text));
}    
//"
}
</script>
<!-- end -->

<form  action="" method="">
             <input id="textInfo" name="text" type="text" value="请输入关键词" 
                      onfocus="if(this.value=='关键词搜索') this.value=''; this.style.color='#666';"
                      onblur="if(this.value=='') {this.value='关键词搜索';this.style.color='#999';}" style="width:150px; margin-right:5px" />
             <input   type=submit     value="" 
                     style="background:url(<%=basePath%>HTML/images/go.jpg); width:40px;"onclick="query();" > 
                </form>

点击搜索跳转不了action啊 ! 求帮助   帮我改一下吧
------解决方案--------------------
相对路径 和绝对路径都试一下
------解决方案--------------------
搜索按钮改为 type="button"再试试
------解决方案--------------------
先看看query方法有没有进去