
name : name
})
改成
$.post("/se113/CompanySer", {name : name
})
试试看,希望能帮到您,谢谢!
首先你的HTML页面里面得有个<form>把你要传的数据包起来,我这里命名ID为 formID,然后加了name属性
<form action="jdcwfcx.do" method="post" id="formID"><input type="text" id="hpzl" name="hpzl" value="02" />
<input type="text" id="fzjd" name="fzjd" value="D" />
<input type="text" id="hphm" name="hphm" value="8r178" />
<input type="text" id="clsbdh" name="clsbdh" value="050237" />
<input type="text" id="type" name="type" value="wfcx" />
<input type="button" id="postf" onclick="postdata" />
</form>
然后提交到后台只需要调用jquery的commit()方法
$("#postf").click(function(){$("#formID").commit()
})
后台获取数据
String hpzl = request.getParameter("hpzl")String fzjd = request.getParameter("fzjd")
.
.
.
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)