使用功能有问题
else if (obj.event === 'yong') {
var teacherid =window.sessionStorage.getItem("teacherid");
// if (data.bstatus == "0") {
var data=obj.data;
//弹出编辑窗
layer.open({
type: 1 //Page层类型
, area: ['500px', '600px']
, title: '信息编辑'
, shade: 0.6 //遮罩透明度
, maxmin: true //允许全屏最小化
, anim: 1 //0-6的动画形式,-1不开启
, content: $('#form_yong'),
});//,function (index) {
layui.use('form', function () {
var form = layui.form;
var id, bname,isbn,press,author,pagination,price,bstatus;
form.val('example1', {
"id": data.id
, "bname": data.bname
, "isbn": data.isbn
, "press": data.press
, "author": data.author
, "pagination": data.pagination
, "price": data.price
, "bstatus": data.bstatus
});
//下拉菜单----------------------------------------------------------------------
layui.use('form',function () {
var $=layui.$;
var form=layui.form;
$.get("../getCourse",{},function (data) {
var list = data.data;
var select = document.getElementById('course');
$("#course").empty();
if (list != null || list.size() > 0) {
for (var course in list) {
var option = document.createElement("option");
option.setAttribute("value", list[course].id);
option.innerText = list[course].coursename;
//alert(list[c].name);
select.appendChild(option)
}