<div title="添加用户" id="win" class="easyui-window" closed="true">
<table>
<tr>
<td>
用户账号:
</td>
<td>
<input type="text" id="uAccounts" name="uAccounts" />
</td>
</tr>
<tr>
<td>
用户密码:
</td>
<td>
<input id="uPassword" name="uPassword" type="text" />
</td>
</tr>
<tr>
<td>
用户姓名:
</td>
<td>
<input id="uName" name="uName" type="text" />
</td>
</tr>
<tr>
<td>
用户年龄:
</td>
<td>
<input id="uAge" name="uAge" type="text" />
</td>
</tr>
<tr>
<td>
用户性别:
</td>
<td>
<input id="uSex" name="uSex" type="text" />
</td>
</tr>
<tr>
<td>
用户电话号码:
</td>
<td>
<input id="uPhone" name="uPhone" type="text" />
</td>
</tr>
<tr>
<td>
<a href="#" class="easyui-linkbutton" iconcls="icon-add" onclick="addUser()">确定</a>
<a href="#" class="easyui-linkbutton" iconcls="icon-cancel">关闭</a>
</td>
</tr>
</table>
</div>
function addUser(){
var uAccounts=$("#uAccounts").val();
var uPassword=$("#uPassword").val();
var uName=$("#uName").val();
var uAge=$("#uAge").val();
var uSex=$("#uSex").val();
var uPhone=$("#uPhone").val();
console.info("uAccount is:"+uAccounts+"\n"+
"uPassword is:"+uPassword);
$.ajax({
data:{
uAccounts:uAccounts,
uPassword:uPassword,
uName:uName,
uAge:uAge,
uSex:uSex,
uPhone:uPhone
},
type:"POST",
dataType: 'json',
url:"/MyHealth/html/addUser",
success:function(data){
$("#success").window("open");
},
error:function(data){
$("#error").window("open");
}
});
}
其它数据可以拿到唯独第一个拿不到,这是为什么?谢谢大神们!
精慕门9254224
相关分类