![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
02/07/2014, 09:10
|
![Avatar de AngelMarine](http://static.forosdelweb.com/customavatars/avatar544663_1.gif) | | | Fecha de Ingreso: enero-2014 Ubicación: Madrid
Mensajes: 79
Antigüedad: 10 años, 4 meses Puntos: 0 | |
Hallar el id del body con getElementsByTagName Hola, soy novato en javascript, me preguntaba si este código que he hecho puede hacer lo que pido: 'Hallar el id del body'.
<script>
var SwitchPage = document.getElementsByTagName('body');
var Page = SwitchPage.getAttribute("Id");
if (a partir de aquí ya lo se) {
...
}else{
...
}
</script> |