Diferencia entre revisiones de «MediaWiki:Descubriendo09.js»
De Descubriendo la Física
Ir a la navegaciónIr a la búsqueda| Línea 1: | Línea 1: | ||
if (window.screen) { |
if (window.screen) { |
||
| + | if (parseInt(navigator.appVersion)>3) { |
||
| + | if (navigator.appName=="Netscape") { |
||
| + | winW = window.innerWidth-16; |
||
| + | winH = window.innerHeight-16; |
||
| + | } |
||
| + | if (navigator.appName.indexOf("Microsoft")!=-1) { |
||
| + | winW = document.body.offsetWidth-20; |
||
| + | winH = document.body.offsetHeight-20; |
||
| + | } |
||
| + | } |
||
| + | alert(winH+" "+winW); |
||
linea="<style> body{ background-image:url('/descubriendo/background.php?anchoPantalla="+ window.screen.width + "');}</style>"; |
linea="<style> body{ background-image:url('/descubriendo/background.php?anchoPantalla="+ window.screen.width + "');}</style>"; |
||
document.write(linea); |
document.write(linea); |
||
Revisión del 11:21 11 dic 2009
if (window.screen) {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth-16;
winH = window.innerHeight-16;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth-20;
winH = document.body.offsetHeight-20;
}
}
alert(winH+" "+winW);
linea="<style> body{ background-image:url('/descubriendo/background.php?anchoPantalla="+ window.screen.width + "');}</style>";
document.write(linea);
document.body.style.background="url('/descubriendo/background.php?anchoPantalla="+ window.screen.width + "');"
}
Debug data:
