国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - Add alert to bootstrap popup layer
天蓬老師
天蓬老師 2017-05-19 10:23:55
0
2
613

bootstrap Add alert on the pop-up layer and cancel it after opening the modal. After opening the modal a second time and triggering the alert event, it will alert twice!

$("#" + data[i].id).on('click', function () {
                    var that = this;
                    $("#uploadmodal").modal('show');
                    $("#submit").on('click', function () {
                        var val = $('#sykmmc option:selected').text();
                        var opV = $('#sykmmc option:selected').val()
                        if(opV=="10086"){
                            alert('您還未選擇科目!');
                            return false;
                        }
                        $(that).parent().find("span").text(val)
                        if($(that).text()=="匹配"){
                            $(that).text("修改")
                        }
                        if($(that).parent().parent().find("td").eq(4).text()=="未匹配")             {
                            $(that).parent().parent().find("td").eq(4).text("已匹配")
                        }
                        $("#uploadmodal").modal('hide');
                    })
                }

Every time the modal is canceled and the modal is triggered again after it is opened again, there will be one more alert than before.

天蓬老師
天蓬老師

歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~

reply all(2)
PHPzhong

1 handful$("#submit").on('click',function(){}) 改成$("#submit").unbind('click').bind('click',function(){})Try

2. You can also put $("#submit") after $("#" + data[i].id).on('click',function(){});. The reason is that you have registered multiple times.

習(xí)慣沉默

Didn’t I say that it is not recommended to pop up multi-layered pop-up windows? Our product manager said that this is not a good user experience...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template