码迷,mamicode.com
首页 > Web开发 > 详细

easyui 标签和ajax冲突的问题

时间:2014-12-10 19:24:35      阅读:328      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   ar   color   os   使用   sp   for   

初始html:使用$(‘#frmLogin‘).serialize()无法获取表单值

<body>
<form id="frmLogin" method="post">
<div id="divLogin" class="easyui-dialog" title="Login Form" style="width:400px; height:200px;"
data-options="iconCls:‘icon-save‘, closable:false, resizable:true,modal:true,minimizable:true,maximizable:true,
toolbar:[{
text:‘编辑‘,
iconCls:‘icon-edit‘,
handler:function(){alert(‘you click edit‘);}
},{
text:‘帮助‘,
iconCls:‘icon-help‘,
handler:function(){alert(‘you click help‘);}
}],
buttons:[{
text:‘保存‘,
iconCls:‘icon-save‘,
handler:function(){ FunSubmit();}
},{
text:‘取消‘,
iconCls:‘icon-cancel‘,
handler:function(){alert(‘youc click cancel‘);}
}]">

<table>
<tr>
<th align="right">用户名:</th>
<td><input name="username" /></td>
</tr>
<tr>
<th align="right">密码:</th>
<td><input name="userpassword" type="password" /></td>
</tr>
</table>
</div>
</form>
</body>

 

修改后的html 将form表单放在easyui标签里面$(‘#frmLogin‘).serialize()序列化表单成功

<body>
<div id="divLogin" class="easyui-dialog" title="Login Form" style="width:400px; height:200px;"
data-options="iconCls:‘icon-save‘, closable:false, resizable:true,modal:true,minimizable:true,maximizable:true,
toolbar:[{
text:‘编辑‘,
iconCls:‘icon-edit‘,
handler:function(){alert(‘you click edit‘);}
},{
text:‘帮助‘,
iconCls:‘icon-help‘,
handler:function(){alert(‘you click help‘);}
}],
buttons:[{
text:‘保存‘,
iconCls:‘icon-save‘,
handler:function(){ FunSubmit();}
},{
text:‘取消‘,
iconCls:‘icon-cancel‘,
handler:function(){alert(‘youc click cancel‘);}
}]">
<form id="frmLogin" method="post">
<table>
<tr>
<th align="right">用户名:</th>
<td><input name="username" /></td>
</tr>
<tr>
<th align="right">密码:</th>
<td><input name="userpassword" type="password" /></td>
</tr>
</table>
</form>
</div>
</body>

 

easyui 标签和ajax冲突的问题

标签:style   blog   io   ar   color   os   使用   sp   for   

原文地址:http://www.cnblogs.com/eye-like/p/4155979.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!