received a design requirements, asked Xmyanke on the right side of the site to hang a pop-up window advertising the recent activities, looking for a half-day did not see the right, I tinker with a line of JS popup code can design a beautiful pop-window ads, to see, Welcome to make comments, JS Pop-window AD code as follows:
Document.writeln ("<div id=\" leftdiv1\ "><a href= ' http://www.xiameneye.org.cn/special/zhengji/' target=_ Blank></a><div class= ' divclose1 ' >< Span onclick=\ "$ (' #leftDiv1 '). Remove () \" > Close x</span></div></div> ");
Add the above code to JS, url and image path to modify their own.
Add a CSS style
#leftDiv1 {width:126px;top:80px;float:right;position:fixed;z-index:10000000;left:2px;_position:absolute;}. Divclose1,.divclose2{height:20px;width:118px;overflow:hidden;font-size:9pt;background-color: #F6F6F6; text-align : Center;cursor:pointer;}. Divclose2 img,.divclose1 Img{cursor:pointer;}
JS Popup ad code CSS style self-tuning ha
A line of JS pop-up code can design beautiful pop-window ads, is not very simple? If you like, go and add one.