<html>
<body> <form id="uform" id="ufrom" action="xxx.do" method="post">
<input type=hidden name="title" value=<%=title %> />
<input type=hidden name="des" value=<%=des %> />
<input type=hidden name="imgPath" value=<%=imgPath %> />
<input type=hidden name="tag" value=<%=tag %> />
<input type=hidden name="number" value=<%=number %> />
<input type=hidden name="" value=<%= %> />
</form>
<input type="button" name="" onclick="check();"/>
</body>
</html>
<script type="text/javascript">
function check(){
//jQuery语句
$.get("xxx.do",{json:json});//get提交json数据
this.onc();//调用onc()方法执行表单提交
}
function onc(){
document.uform.submit();//提交form 中的信息
}
</script>form 与 get 方法都是提交到同个Action,这样运行怎么会有冲突呢,如果没有冲突,怎么写?
忘各位都说下 ,谢谢
if("POST".equals(request.getMethod()) {
POST 处理
} else {
GET 处理
}2、访问Action时,在Action名后加上“!xxx”(xxx为方法名)
具体可参见:http://www.blogjava.net/max/archive/2006/10/25/77157.html