Diferencia entre revisiones de «MediaWiki:Descubriendo10.js»
De Descubriendo la Física
Ir a la navegaciónIr a la búsqueda| Línea 8: | Línea 8: | ||
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x; |
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x; |
||
alert("Estás usando el internes esplorer..."); |
alert("Estás usando el internes esplorer..."); |
||
| − | + | alert((document.body.offsetWidth)); |
|
/* var winW = (document.body.offsetWidth)-20; |
/* var winW = (document.body.offsetWidth)-20; |
||
var winH = (document.body.offsetHeight)-20;*/ |
var winH = (document.body.offsetHeight)-20;*/ |
||
| Línea 15: | Línea 15: | ||
| ⚫ | |||
| − | /* |
||
| ⚫ | |||
document.write(linea); |
document.write(linea); |
||
document.body.style.background="url('/descubriendo/skins/descubriendo10/background.php?anchoPantalla="+ window.screen.width + "');" |
document.body.style.background="url('/descubriendo/skins/descubriendo10/background.php?anchoPantalla="+ window.screen.width + "');" |
||
} |
} |
||
| − | */ |
||
Revisión del 21:15 18 jun 2010
if (window.screen) {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth-16;
winH = window.innerHeight-16;
}
}
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
alert("Estás usando el internes esplorer...");
alert((document.body.offsetWidth));
/* var winW = (document.body.offsetWidth)-20;
var winH = (document.body.offsetHeight)-20;*/
}
}
linea="<style> body{ background-image:url('/descubriendo/skins/descubriendo10/background.php?anchoPantalla="+ /*window.screen.width*/ winW + "');}</style>";
document.write(linea);
document.body.style.background="url('/descubriendo/skins/descubriendo10/background.php?anchoPantalla="+ window.screen.width + "');"
}
Debug data:
