首页 > 代码库 > layer弹出框

layer弹出框

layer:

  下载js和layer库

弹出框类型:

  警告:

  对话框:

  框架:  

//弹出窗口
$(document).ready(function(){
    $("#login").click(function(){
        $.layer({
            type: 2,
            title: false,
            fix: false,    
            border : [5, 0.3, ‘#666‘, true],
            offset: [‘100px‘,‘‘],
            area: [‘300px‘,‘100px‘],
            iframe: {src: ‘gamehouse/frame‘},
            success: function(){                
            }
        });
        });
});

//子窗口控制父窗口
$(document).ready(function(){

    var index = parent.layer.getFrameIndex(window.name);
    $(‘#a‘).click(function(){    
        var username=$("#username").val();
        parent.$("#test").val(username);
        parent.layer.close(index);
    });
});
frame