Home >Web Front-end >JS Tutorial >Use js objects to pop up a layer_javascript skills

Use js objects to pop up a layer_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:05:42972browse

复制代码 代码如下:

 
 
 
 
脚本之家-弹出一个层 
 
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(); 

 
 

 
 
弹了一个层

 
 
 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:js alternative writing method_js object-orientedNext article:js alternative writing method_js object-oriented

Related articles

See more