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
Release: 2016-05-16 19:05:42
Original
978 people have browsed it

复制代码 代码如下:

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

 
 

 
 
弹了一个层

 
 
 
Related labels:
source:php.cn
Previous article:js alternative writing method_js object-oriented Next article:javascript YUI code reading diary YAHOO.util.Dom - Part.4_YUI.Ext related
Statement of this Website
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template