nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
脚本之家-弹出一个层
<script> <BR>function cmsgbox(vtitle,vwidth,vhight,vtop,vleft) <BR>{ <BR> this.title=vtitle; <BR> this.width=vwidth; <BR> this.height=vhight; <BR> this.top=vtop; <BR> this.left=vleft; <BR> this.id=0; <BR>} <BR>cmsgbox.prototype.showdiv=function() <BR>{ <BR> var str=""; <BR> str+="<div id='div1' style='z-index:1;background-color:white;position:absolute;border:2px solid slategray;left:"+this.vleft+"px;top:"+this.vtop+"px;width:"+this.width+"px;'>"; <br><br> str+="<div style='padding-bottom:2px;background-color:slategray;width:100%;height:16px;color:white;' >"; <BR> str+=" <div style='float:left;height:16px;overflow:hidden;margin:0px;padding:4px 0px 0px 5px;width:"+(parseInt(this.width)-24*2-5)+"px;'>"+this.title+"</script>
";
str+="
0";
str+="
r";
str+="";
str+="
";
str+="xxx";
str+="
";
str+="";
//document.write(str);
document.body.insertAdjacentHTML("beforeEnd",str);
}
/////////////////////窗口显示//////////////////////////////
function show()
{
var box=new cmsgbox('小家伙呀',400,300);
box.showdiv();
}
弹了一个层