莱农美食网
您的当前位置:首页利用js对象弹出一个层_javascript技巧

利用js对象弹出一个层_javascript技巧

来源:莱农美食网


代码如下:




脚本之家-弹出一个层

function cmsgbox(vtitle,vwidth,vhight,vtop,vleft)
{
this.title=vtitle;
this.width=vwidth;
this.height=vhight;
this.top=vtop;
this.left=vleft;
this.id=0;
}
cmsgbox.prototype.showdiv=function()
{
var str="";
str+="";

str+="";
str+=" "+this.title+"";
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();
}



弹了一个层




显示全文