easy ui form 提交问题

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">昨天在写一个form提交的时候,js代码没有什么问题,然后请求就是不能进入action,还来就反复折腾,最后看了帮助文档,才发现问题,原来easy ui的form提交必须啊在form标签中必须写上 </span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 0, 0); background-color: rgb(255, 255, 255);">method="post"!method="post"!method="post"!</span><span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">(重要的事说三遍!!!)才会好使。</span>


学习的不透彻啊!学的不透彻啊!学的不透彻啊!


<form id="formTT" method="post">
	<input type="hidden" name="id" value="${userinfo.id}">
	<table border='1' width="auto">
			<tr>
				<td>邮费:</td>
				<td>
					<input type="text" class="easyui-numberbox" value="${userinfo.post_price}" name="post_price"/>
				</td>
			</tr>
			<tr>
				<td>起邮价格:</td>
				<td>
					<input type="text" class="easyui-numberbox" value="${userinfo.post_price_m}" name="post_price_m"/>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="right">
					<input type="button" value="保存" id="btnSave">
				</td>
			</tr>
	</table>
</form>
</body>
<script>
$('#btnSave').bind('click', function(){   
	save();
});
function save(){
	$.messager.confirm('ConFirm','确定提交吗',function(r){
		if(r){
			$("#formTT").form("submit",{   
			    url:"Tenants?type=updateTenants", 
			    onSubmit: function(){  
			    	//校验
			    },   
			    success:function(data){
					if(data==1){
						alert("保存成功");
					}
			    }   
			}); 
		}
		
	});
}

</script>





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值