js 常用问题(个人笔记)mysql 执行sql成功返回null

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 标签有问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值