ASP+Jquery+AJAX接受不到表单提交的数据
1.asp<formname="form1"method="POST"action="?action=save"><inputname="ePoints"type="te...
1.asp
<form name="form1" method="POST" action="?action=save">
<input name="ePoints" type="text" id="ePoints" size="10" value="100" >
<input name="button" id="btn-submit" type="button" class="btn1" value="确定提取 "/>
</form>
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script>
$(document).ready(function () {
$("#btn-submit").click(function(){
$.ajax({
type:'post',
url:'22.asp',
dataType: "html",
data:$("form").serialize(),
success:function(data){
console.log($("form").serialize());
console.log(data);
},
error:function(e){
console.log(e);
window.location.reload();
}
});
});
});
</script>
22.asp
response.write Trim(request("ePoints")) :response.End()
ePoints输 不出这个的值 展开
<form name="form1" method="POST" action="?action=save">
<input name="ePoints" type="text" id="ePoints" size="10" value="100" >
<input name="button" id="btn-submit" type="button" class="btn1" value="确定提取 "/>
</form>
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script>
$(document).ready(function () {
$("#btn-submit").click(function(){
$.ajax({
type:'post',
url:'22.asp',
dataType: "html",
data:$("form").serialize(),
success:function(data){
console.log($("form").serialize());
console.log(data);
},
error:function(e){
console.log(e);
window.location.reload();
}
});
});
});
</script>
22.asp
response.write Trim(request("ePoints")) :response.End()
ePoints输 不出这个的值 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询