ET20020215
2022-06-25 12:40
采纳率: 80%
浏览 30
已结题

JAVAEE外键有问题 网页下拉菜单不显示另一个表的信息,数据传不到另外一个表(课程教材记录)里面去

img

使用功能有问题
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)
                        }
           

1条回答 默认 最新

相关推荐 更多相似问题