怎么能从ajax中把form表单中的数据传到sturns中的action中呢? 不用在url中添加参数 就能直接传到action中
解决方案 »
- 求助JAVA高手:myeclipse7.1不编译FSO,怎么解决?
- frame中参数传递
- 调试简单struts框架,出现错误
- struts2 限制重复提交的问题。
- JVM 加入属性-Dfile.encoding=utf-8 导致中文乱码
- 拿到SCJD证了,开心散分。
- 简单的时间问题,我是菜鸟需要大家帮忙???
- String 型如何转化成Vector类型~~
- 谁能提供经典的SQLSERVER数据库连接,操作类代码?高分
- applet中权限的问题,困扰了我一周的问题。
- 关于jsp中的request.getInputStream()上传文件的问题
- 执行DataSource对象的getConnection()方法发生空指针异常,请大虾们指点下,谢拉
var postContent ="name=" + encodeURIComponent("eric") + "&email=" + encodeURIComponent("[email protected]");
xmlhttp.open("POST", "/register.do", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send(postContent); 如果你不喜欢用字符串拼post的内容,建议用form提交到iframe的方法实现异步处理。
<input name="action" type="hidden" value="getOperatorInfoSelect"/>
<input name="customerId" type="hidden"/>
</form>
<iframe name='getOperatorInfoSelect' src='' height='0' width='0' bordercolor='#E2EBF6' frameborder="0" scrolling="no" height="100%" width="100%"/>
这段给你看下把 就是把这个form 放到 这个iframe 里提交
需要getOperatorInfoSelect.jsp这个页面 然后在这个页面初始化的时候把数据给他的parent页面
这样就避开ajax了