真闷,在这个"物欲横流"的社会,我发现程序员的主要精力都放到浏览器的兼容性上了
我写一个网页
<!--
function toSave(){
[b]window.location.href="<%=contentPath%>/core/homePage/contentManage/ge_test/toSave.action";[/b] }
function toEdit(id){
[b]window.location.href="<%=contentPath%>/core/homePage/contentManage/ge_test/toEdit.action?id="+id;[/b] }
function remove(id){
if(confirm("是否确定删除?"))
[b]window.location.href="<%=contentPath%>/core/homePage/contentManage/ge_test/remove.action?id="+id;[/b] else return;
}
-->
</script>
<body>
<div id="man_zone">
<s:form action="/core/homePage/contentManage/ge_test/queryList.action">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="25">
<td width="100%" align="left">
ID:
<input type="text" name="ge_test.id" value="" />
NAME:
<input type="text" name="ge_test.name" value="" />
<input icon="icon-search" type="submit" value="查询">
</td>
</tr>
<tr>
<td align="right">
<input icon='icon-add' type="button" css='btn' value="添加" onclick="javascript:toSave()"/>
<input icon='icon-delete' type="button" css='btn' value="删除" onclick="javascript:removeMore()"/>
</td>
</tr>
</table>
</s:form>
在IE下很好,但是跑到火狐下就不能提交了....
解决方案
将window.location.href改成window.location才OK
都不知道什么时候才有统一的标准....看来统一江湖还是有好处的...对我们来说