效果图:
[img]http://files.jb51.net/file_images/article/201404/201404151604171.gif?201431516511[/img]
html链接:
[url=#]
css:
img{ border:0px;}
#registerwindow{ width:600px; height:400px; top:50px; right:100px; background:#FFF; display:none; border:5px #999 solid; position:absolute; z-index:999;}
#modelshade{width:100%; height:100%; background:#000; display:none; position:absolute; top:0px; z-index:0;}
一:创建和调用模式窗口
[url=#]$('.close_button').css({'margin-left':'535px','margin-top':'0px'});
二:创建阴影背景
$('#modelshade').css('opacity','0.8').fadeIn(2000);
三:关闭模式窗口
$('a.close,#modelshade').click(function(){
var thismodelID= $('a.close').parent().attr('id');
$('#modelshade,#'+thismodelID).fadeOut(function(){
$('a.close,#modelshade').remove();
});
return false;
});
关闭点击功能的失败连接,该方法将保持连接并尝试载入另一个页面到浏览器
return false;
});
<!-- 注册model end-->
lt;/script>