JS crea efectos especiales de anuncios en la izquierda y derecha de las páginas web.
Cita:
La copia del código es la siguiente:
<script src = "js/ad.js" type = "text/javascript"> </script>
2. Llamada de página
< xmlns = "http://www.w3.org/1999/xhtml" lang = "zh-cn"> <fead> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> JS crea efectos publicitarios para los efectos de la izquierda y la derecha flotante pages_www.vevb.com </title> <style> Body {Font-Family: Arial, Helvetica, Sans-Serif, "安体"; tamaño de fuente: 12px; Altura: 2000px; color:#667382}*{relleno: 0px; margen: 0px;} ul {margin: 0px; padding: 0px;} li {list-style-type: none; margin: 0px; padding: 0px;}. fl {float: left;}. fr {float: right;}. cl {transparente: ambos;}. zz {margen-top: 0px; marzo-right: marco; 0px; margin-left: auto;}. tc {text-align: center;}. jiac {font-weight: back;}. cur {cursor: pointer;} img {border: 0px;} </style> </head> <body> <script src = "js/ad.js" type = "text/javascript"3. JS Código de anuncios suspendido ad.js
var browser = {ie6: function () {return ((window.xmlhttprequest == undefined) && (activoChed! = Undefined))}, getwindow: functer () {var myheight = 0; var; var; myWidth = 0; if (typeof (window.innerWidth) == 'number') {myheight = window.innerheight; myWidth = window.innerWidth} else if (document.DocumentElement) {myHeight = document.DocumentElement.ClientHeight; myWidth = document.document.clientwidth} if (document.body) {myheight = document.body.clientheight; mywidth = document.body.clientwidth} return {'altura': myheight, 'width': mywidth}}, getscroll: function () {var myHeight = 0; var; var; myWidth = 0; if (typeof (window.pageyOffset) == 'number') {myHeight = window.pageyOffset; myWidth = window.pagexOffset} else if (document.documentElement) {myHeight = document.documentElement.scrolltop; myWidth = document.document.scrollleft} if (document.body) {myheight = document.body.scrolltop; mywidth = document.body.scrollleft} return {'altura': myHeight, 'width': mywidth}}, getdocwidth: function (d) {if (! d) var d = document; return Math.max (math.max (d.body.scrollwidth, d.documentelement.scrollwidth), math.max (d.body.offsetwidth, d.documentelement.offsetwidth), math.max (d.body.clientwidth, d.documentelement.clientwidth))}, getdocheight: function (d) {if (if) Math.max (Math.max (D.Body.Scrollheight, D.DocumentElement.ScrollHeight), Math.max (D.Body.OffSetheTight, D.DocumentElement.OffSetHeTeight), Math.Max (D.Body.ClientHeight, D.DocumentElement.ClientHeight)}; var dom = {Id: function (id) {id) {id) type = typeOf (id); if (type == 'Object') return id; if (type == 'string') return document.getElementById (id); return null}, inserthtml: function (html) {var frag = document.createDocumentFragment (); var = var = document.createElement ("div"); div.innerhtml = html; i = 0, ii = div.childnodes.length; i <ii; i ++) {frag.appendChild (div.childnodes [i])} document.body.insertbefore (frag, document.body.firstchild)}}}; var myevent = {add: function (element, type, manejador) {var myevent ele = dom.id (elemento); if (! ele) return; if (ele.addeventListener) ele.addeventListener (type, handler, false); else if (ele.attachevent) ele.attachevent ("en"+type, manejador); else ele ["en"+type] = Handler (eliminación: función (elemento, tipo, handler) ele = dom.id (elemento); if (! ele) return; if (ele.removeEventListener) ele.removeEventListener (type, handler, false); else if (ele.detachevent) ele.detachevent ("en"+type, handler); ele ele ["on"+type] = null}}; var Position = {Rightcenter: Function {Id) id = dom.id (id); var ie6 = browser.ie6 (); var win = browser.getwindow (); var ele = {'height': id.clientHeight, 'width': id.clientwidth}; if (ie6) {var scrollbar = browser.getScroll ()} más {var var scrollbar = {'altura': 0, 'ancho': 0}; id.style.position = 'fijo'} ele.top = parseInt ((win.height-ele.height) /2+scrollbar.h ocho); id.style.top = ele.top+'px'; id.style.right = '3px'}, FloatRightCenter: function (id) {posicion.rightCenter (id); var); divertir = function () {posicion.rightCenter (id)}; if (browser.ie6 ()) {myEvent.add (ventana, 'scroll', diversión); myEvent.add (ventana, 'resear', diversión)} más {myEvent.add (ventana, 'cambiar', diversión)}}}, izquierda: function (id) {var Id = dom = dom); ie6 = browser.ie6 (); var win = browser.getwindow (); var ele = {'height': id.clientheight, 'width': id.clientwidth}; if (ie6) {var scrollbar = browser.getScroll ()} else {var var scrollbar = {'altura': 0, 'ancho': 0}; id.style.position = 'fijo'} ele.top = parseInt ((win.height-ele.height)/2+scrollbar .Height); id.style.top = ele.top+'px'; id.style.left = '3px'}, floatleftcenter: function (id) {posicion.leftcenter (id); var divertir = function () {posicion.leftcenter (id)}; if (browser.ie6 ()) {myEvent.add (ventana, 'scroll', diversión); myEvent.add (window, 'resear', diversión)} más {myEvent.add (ventana, 'cambiar', diversión)}}}}; function ad_left () {var html; html = '<div id = "ad_left" style = "posición: absoluto; ancho: 130px; altura: 300px; z-índice: 10001"> <a style = "posición: absoluto; superior: -15px; izquierda: 0;" href = "javascript: void (0);" onClick = "document.getElementById (/'ad_left/'). style.display =/'none/'"> Close </a> <a href = "http://www.plchome.org"> <img src = "imágenes/ad.jpg"/> </a> </iv> '; dom.insertttml (html); posición.floatleftcenter ('ad_left');} function ad_right () {var html; html = '<div id = "ad_right" style = "posición: absoluto; ancho: 130px; altura: 300px; z-odex: 10001"> <a style = "posición: absoluto; superior: -15px; correcto: 0;" href = "javascript: void (0);" onClick = "document.getElementById (/'ad_right/'). style.display =/'none/'"> Close </a> <a href = "// www.vevb.com"> <img src = "imágenes/ad.jpg"/> </a> </div> '; dom.insertttml (html); posicion.floatrightcenterer ('ad_right');} myEvent.add (ventana, 'load', ad_left); myevent.add (ventana, 'cargar', ad_right);Finalizar.