<form id="ff" method="post">
,
<div id="win" class="easyui-window" title="系统登录" style="width: 345px; height: 180px; padding: 10px" data-options="modal:true,collapsible:false,minimizable:false,maximizable:false,closable:false,resizable:false,draggable:false">
<div class="easyui-panel" data-options="width:310">
<p><span class="lbl_R">用户名:</span><input type="text" name="username" class="ipt" /></p>
<p><span class="lbl_R">密码:</span><input type="text" name="password" class="ipt" /></p>
</div>
<div style="margin: 10px auto; text-align: right;">
<a href="javascript:void(0)" id="login" class="easyui-linkbutton">登录</a>
<a href="javascript:void(0)" id="reset" class="easyui-linkbutton">重置</a>
</div>
</div>
</form>
上面这种写法,通过easyui的ajax提交,后台获取不到表单数据,只需要将表单嵌套在#win的div下就可以解决
<div id="win" class="easyui-window" title="系统登录" style="width: 345px; height: 180px; padding: 10px" data-options="modal:true,collapsible:false,minimizable:false,maximizable:false,closable:false,resizable:false,draggable:false">
<form id="ff" method="post">
<div class="easyui-panel" data-options="width:310">
<p><span class="lbl_R">用户名:</span><input type="text" name="username" class="ipt" /></p>
<p><span class="lbl_R">密码:</span><input type="text" name="password" class="ipt" /></p>
</div>
</form>
<div style="margin: 10px auto; text-align: right;">
<a href="javascript:void(0)" id="login" class="easyui-linkbutton">登录</a>
<a href="javascript:void(0)" id="reset" class="easyui-linkbutton">重置</a>
</div>
</div>