ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 自写的两个jquery弹窗

自写的两个jquery弹窗

原创 Linux操作系统 作者:664054106 时间:2013-02-04 17:07:30 0 删除 编辑

var MyjQuery = {};

MyjQuery.div_msg = new Object({
    div_msg_sure: function(width, height, txt) {
        $("body").append("

×
" + txt + "
");
        //document.getElementById("div_msg").style.display = "block";
        $("#div_msg_close").click(function() {
            $("#sure_div_msg").remove();
        }).mouseover(function() {
            $("#div_msg_close").css("cursor", "hand");
        });
        $("#div_msg_sure").click(function() {
            $("#sure_div_msg").remove();
        });
    },

    //延时自动关闭框
    /*
    width:自动关闭框宽度
    height:自动关闭框高度
    txt:自动关闭框文本
    timeleng:自动关闭时间/秒
    */
    div_msg_autoclose: function(width, height, txt, timeleng) {
        $("body").append("

×
" + txt + "
");
        //document.getElementById("div_msg").style.display = "block";
        $("#autoclose_div_msg_close").click(function() {
            $("#autoclose_div_msg").remove();
        }).mouseover(function() {
            $("#autoclose_div_msg_close").css("cursor", "hand");
        });
        setTimeout(function() {
            $("#autoclose_div_msg").remove();
        }, timeleng * 1000);
    }
});

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26481450/viewspace-753909/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2011-11-25

  • 博文量
    27
  • 访问量
    78455