自己写一个信息页面:我这里弹出的信息页面用baidu网站代替:
!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"""
htmlxmlns=""
head
title右下角弹出提示信息框/title
/head
styletype="text/css"
#rbbox{
position:absolute;
right:0;
bottom:0;
width:300px;
height:0px;
overflow:hidden;
}
/style
body
divid="rbbox"
iframesrc=""frameborder="0"height="200"width="300"scrolling="no"/iframe
/div
scriptlanguage="javascript"type="text/javascript"
window.onload=function(){
showBox();
functionshowBox(o){
if(o==undefined)o=document.getElementById("rbbox");
o.style.height=o.clientHeight+2+"px";
if(o.clientHeight200)setTimeout(function(){showBox(o)},5);
functioncloseBox(){
document.getElementById("rbbox").style.display="none";
/script
/body
/html
style
#tishi{
margin-left:auto;
margin-right:auto;
border:2pxsolid#FFFFFF;
font-size:12px;
font-family:"宋体";
color:#990000;
padding-top:20px;
width:400px;
height:200px;
z-index:110;
background:#e7e7e7;
left:0;
top:0;
opacity:0.5;
filter:Alpha(opacity=85);
//上面显示登陆框的
#Yangan{
filter:Alpha(opacity=40);//透明40%
background:#303030;
opacity:0.80;
width:100%;//可见部分全部隐罩效果
height:100%;
position:absolute;//
//这里隐罩效果
divid="tishi"
divid="Yangan"/div//
你说的这种登陆窗口一般都是使用ajax请求。
$.ajax([
...
success:function(){
//状态栏内容更新
//关闭登陆窗口
]);
jQuery弹出框,其实是创建一个div,然后定位div,用css渲染div效果。
比如实例:
当点击一个按钮,弹出一个对话款,在网页中间。
代码如下:
!DOCTYPEhtml
html
title/title
scripttype="text/javascript"src=""/script
scripttype="text/javascript"
$(function(){
$('#show').click(function(){
varhtml='divid="windows"成功啦,这样总可以设我为最佳了吧?哈。^_*/divdivid="bg"/div';
$('body').append(html);
varleft=($(document).width()-$('#windows').width())/2;
$('#windows').css({left:left});
$('#bg').show().height($(document).height()).css({'opacity':0.7});
});
html,body{margin:0;padding:0;}
#show{padding:100px;font-size:36px;}
#windows{position:absolute;top:100px;left:50px;background:#CCC;width:500px;padding:20px;z-index:999;text-align:center;}
#bg{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1;background:#000;}
divid="show"点我啊/div
---------------------------------------
代码是我大半夜手敲的哦,这样总可以吧?谢谢哦,你懂得。。。