1.layer.open 传值格式
$(document).on('click','.open_add_page1',function(){
var uId = $(this).attr('id');
console.log(uId+"--------------");
layer.open({
type: 2,
area: ['600px', '560px'],
fixed: false, //不固定
maxmin: true,
content: 'update_user.html?uId='+ uId
});
})
2.url js 取值
var uId = window.location.href.split("?uId=")[1];
3.迭代填充select 下拉框
var datas=res.obj;
var option = document.createElement("option");
$(option).text("角色");
$(option).val('');
$('#period').append(option);
for(var i=0;i<datas.length;i++){
var option = document.createElement("option");
$(option).val(datas[i].rId);
$(option).text(datas[i].rName);
$('#period').append(option);
}
4.单选按钮回显参数
$('input:radio[name="sex"]:checked').val(data.sex);
5.select回显
$("#period").find("option[value='"+data.accountLevel+"']").attr("selected",true);
6.select重置
$("#applRes:first option:first").attr("selected",true).
siblings("option").attr("selected",false);
6.mysql 执行成功,数据库有变化,返回执行结果,可能是mybatis 标签有问题


452

被折叠的 条评论
为什么被折叠?



