<div class="codetitle"> <span><a style="CURSOR: pointer" data="80625" class="copybut" id="copybut80625" onclick="doCopy('code80625')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code80625"> <br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <br><html> <br><head> <br><meta http-equiv ="Content-Type" content="text/html; charset=gb2312" /> <br><title> New Document </title> <br><script type="text/javascript" src=" ../jquery-1.7.2.js"></script> <br><script type="text/javascript"> <br>//Create a pop-up layer, title, width, height Height, content content, url If the url is not empty, overwrite the content and load the content in the url page <br>function CreatePopLayerDiv(title,width,height,content,url){ <br>var titles = title || "title" ; <br>var Iheight=$(window).height(); <br>var Iwidth =$(window).width(); <br>var heights = height || 300; <br>var widths = width | | 500; <br>var Oheight= (Iheight -heights) / 2; <br>var Owidth = (Iwidth - widths) /2; <br>var contents = content || "content"; <br>var div = "<div id='InDiv' style='width:" Iwidth "px;height:" Iheight "px;background-color:#888;position:absolute;z-index:10000;top:0;left:0 ;opacity:0.7;'><div id='offDiv' style='width:" widths "px;height:" heights "px;left:" Owidth "px;top:" Oheight "px;background-color :white;position:absolute;z-index:10001;'><h4 id='HTitle' style='margin:0px;padding:3px;background:#336699;opacity:0.9;border:1px solid ## 336699;height:20px;line-height:20px;font:12px Verdana, Geneva, Arial, Helvetica, sans-serif;color:white;cursor:pointer;text-align:left;'>" titles "<a id='AClose' onclick='btnCloses()' style='float:right;'>Close</a></h4><div id='Content'>" contents "</div> ;</div></div>"; <br>$(document.body).append(div); <br>if(url != ""){ <br>$("#Content") .load(url); <br>} <br>} <br>//Remove popup layer<br>function RemoveDiv(){ <br>$("#AClose").remove(); <br>$ ("#HTitle").remove(); <br>$("#offDiv").remove(); <br>$("#InDiv").remove(); <br>} <br>$( function(){ <br>$("#btnTCC").click(function(){ <br>CreatePopLayerDiv("The shining moment",600,400,"pop-up layer","table even-numbered rows change color.html"); <br>}); <br>}) <br>function btnCloses(){ <br>RemoveDiv(); <br>} <br></script> <br></head> <br>< body> <br><input type="button" id="btnTCC" value="pop-up layer" /> <br></body> <br></html> <br> </div>