复主代码 代码如下: <머리> 脚本之家-弹出一个层 <br>함수 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;너비:" 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 "</div>"; <br> str =" <span style='width:14px;font-family:webdings;cursor:hand;'>0</span>"; <br> str =" <span style='width:14px;font-family:webdings;cursor:hand;' onclick='cmsgbox.closediv(this);'>r</span>"; <br> str ="</div>"; <br><br> str ="<div style=' 여백:10px 5px 10px 10px;word-break:break-all;'>"; <br> str ="xxx"; <br> str ="</div>"; <br> str ="</div>"; <br> //document.write(str); <br> document.body.insertAdjacentHTML("beforeEnd",str); <br>} <br>/////////////////////窗口显示//////////////////// ///////// <br>function show() <br>{ <br> var box=new cmsgbox('작은집呀',400,300); <br> box.showdiv(); <br>} <br> <스타일> 본문{ 글꼴 크기:12px; } <본문> 弹了一个层