keyword.value sort.value filter.value的关系吧改成类似document.getELementById("keyword").value应该就可以了没装ff,没有把握
解决方案 »
- 有关于离开弹出层的范围,弹出层就自动关闭
- javascript中以下两句有什么区别?
- 为什么图片按钮在onMouseOver时反复下载图片?
- 请问如何用JavaScript实现点击按钮画面转移的操作?[在线等]
- 求一个哪年哪月哪日 哪时哪分 的日期代码,急!~!
- 急,当我的输入光标通过某种方式到一输入框(text),我想把输入框中的值选中,那样我想重新输入的话,就不要再按(backspace或delete按钮
- 客户端vbs写的fso打开文件,能不能去掉安全警告
- iframe中的word内容
- 请高手帮个忙谢谢!
- 高手:用javascript提交数据如:window.open();能否不打开新窗口,直接把server返回的数据放到当前页的表单中。多谢!
- 刷新问题
- 急!调用javascript后页面重新定位问题!!!
'/MyGroupsShow.do?gid=<%=gid%>&page=1&keyword='+keyword.value+'&sort='+sort.value+'&filter='+filter.value+'#groupsearch'
你的sort.value和filter.value是否是直接用ID作为引用的?是的话请改为用document.getElementById等DOM方法获取该对象这个字符串的全部内容是什么?看是否先需要编码
有特殊字符用escape(...)编码比较有保障就是服务器读取时解码麻烦了一些
这的问题,去掉它们就可以了,但应该怎么改呢?用document.getElementById也不行啊,还是没反映。
http://localhost:8080/site/MyGroupsShow.do?gid=32&page=1&keyword=test&sort=null&filter=null#groupsearch
搜索关键字是test
<table width="100%" border="0" align="center" cellpadding="0"
cellspacing="0" bgcolor="FFF2CF">
<tr>
<td width="22%" align="left" valign="middle"><select name="filter" id="filter" size="1" onChange="if (this.options[this.selectedIndex].value!=null){location='<%=Config.getWebContextRoot()%>/MyGroupsShow.do?gid=<%=gid%>&page=1&keyword=<%=keyword%>&sort='+sort.value+'&filter='+this.options[this.selectedIndex].value+'#groupsearch'}">
<option value="null"
<%if(filter.equals("null")){out.print("selected");}%>> Show All Grades </option>
<logic:iterate id="levelresults" name="levelresults"
scope="request"> <bean:define id="levelresults" name="levelresults"
type="java.lang.String" />
<option value="<%=levelresults%>"
<%if(filter.equals(levelresults)){out.print("selected");}%>> <bean:write name="levelresults" /> </option>
</logic:iterate>
</select>
</td>
<td width="13%" height="30" align="right" valign="middle"><div align="center"> page <%=pagenum%> of <%=pagecount%> </div></td>
<td width="41%" align="center" valign="middle"><INPUT style="BORDER-RIGHT: #3399cc 1px solid; BORDER-TOP: #3399cc 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BORDER-LEFT: #3399cc 1px solid; COLOR: #3399cc; BORDER-BOTTOM: #3399cc 1px solid; FONT-FAMILY: Arial" size=21 name=keyword value='<%=keyword%>' id="keyword" onClick="javascript:this.value='';">
<INPUT name="button" type="button" class=button
onmouseover="this.className='buttonHover';"
onmouseout="this.className='button';" value=" GO "
onclick="location='<%=Config.getWebContextRoot()%>/MyGroupsShow.do?gid=<%=gid%>&page=1&keyword='+document.getELementById("keyword").value+'&sort='+document.getELementById("sort").value+'&filter='+document.getELementById("filter").value+'#groupsearch'">
</td>
<td width="24%" align="right" valign="middle"><select name="sort" id="sort" onChange="if (this.options[this.selectedIndex].value!=null){location='<%=Config.getWebContextRoot()%>/MyGroupsShow.do?gid=<%=gid%>&page=1&keyword=<%=keyword%>&sort='+this.options[this.selectedIndex].value+'&filter='+filter.value+'#groupsearch'}">
<option value="null"
<%if(sort.equals("null")){out.print("selected");}%>> Sort By Relevance </option>
<option value="0"
<%if(sort.equals("0")){out.print("selected");}%>> Sort By Creation Date </option>
<option value="1"
<%if(sort.equals("1")){out.print("selected");}%>> Sort By Author </option>
<option value="2"
<%if(sort.equals("2")){out.print("selected");}%>> Sort By Title </option>
</select>
</td>
</tr>
</table>
onmouseover="this.className='buttonHover';"
onmouseout="this.className='button';" value=" GO "
onclick="location='/site/MyGroupsShow.do?gid=32&page=1&keyword='+document.getELementById("keyword").value+'&sort='+document.getELementById("sort").value+'&filter='+document.getELementById("filter").value+'#groupsearch'">
</td>
<td width="24%" align="right" valign="middle"><select name="sort" id="sort" onChange="if (this.options[this.selectedIndex].value!=null){location='/site/MyGroupsShow.do?gid=32&page=1&keyword=Search Group Resources&sort='+this.options[this.selectedIndex].value+'&filter='+filter.value+'#groupsearch'}">
//<![CDATA[
function foo() {
var sortVal = document.getElementById("sort").value;
var keyVal = document.getElementById("keyword").value;
var filterVal = document.getElementById("filter").value;
var locationUrl = '/site/MyGroupsShow.do?gid=32&page=1&keyword='+keyVal+'&sort='+sortVal+'&filter='+filterVal+'#groupsearch'
alert(locationUrl);
location.href=locationUrl;
}
//]]>
</script>
<input id="keyword"/>
<input id="filter"/>
<INPUT name="button" type="button" value=" GO " onclick="foo();">
</td>
<td width="24%" align="right" valign="middle"><select name="sort" id="sort" onChange="if (this.options[this.selectedIndex].value!=null){location='/site/MyGroupsShow.do?gid=32&page=1&keyword=Search Group Resources&sort='+this.options[this.selectedIndex].value+'&filter='+filter.value+'#groupsearch'}">
//<![CDATA[
function foo() {
var osort = document.getElementById("sort");
var sortVal = osort.options[osort.selectedIndex].value;
var keyVal = document.getElementById("keyword").value;
var filterVal = document.getElementById("filter").value;
var locationUrl = '/site/MyGroupsShow.do?gid=32&page=1&keyword='+keyVal+'&sort='+sortVal+'&filter='+filterVal+'#groupsearch'
alert(locationUrl);
location.href=locationUrl;
}
//]]>
</script>