Diferencia entre revisiones de «MediaWiki:Descubriendo09.js»
De Descubriendo la Física
Ir a la navegaciónIr a la búsqueda (New page: alert("Hola!");) |
|||
| Línea 1: | Línea 1: | ||
| + | if (window.screen) { |
||
| − | alert("Hola!"); |
||
| + | if (screen.width < = 400) { |
||
| + | document.body.style="background-color:FF0000"; |
||
| + | }else{ |
||
| + | document.body.style="background-color:FF00FF"; |
||
| + | } |
||
| + | } |
||
Revisión del 23:52 29 nov 2009
if (window.screen) {
if (screen.width < = 400) {
document.body.style="background-color:FF0000";
}else{
document.body.style="background-color:FF00FF";
}
}
Debug data:
