Salve ragazzi....
è possibile ricavare l'ID dato al firstChild del nodo di riferimento?
in sostanza c'è una voce come "nodeValue" , "length" , "nodeName" ?
Sono ore che cerco in giro per il web... non sò come fare
Ciau^^
Salve ragazzi....
è possibile ricavare l'ID dato al firstChild del nodo di riferimento?
in sostanza c'è una voce come "nodeValue" , "length" , "nodeName" ?
Sono ore che cerco in giro per il web... non sò come fare
Ciau^^
Ciao.
Esempio tirato via ma guarda
se ti illumina![]()
Codice PHP:
<html>
<head><title>Using the DOM</title></head><body>
<em id="pippo">oooo[/i]
</p>
<script type="text/javascript">
//var p = document.getElementsByTagName("p")[0].childNodes[0];
var p = document.getElementsByTagName("p")[0].firstChild;
var myId = p.getAttribute("id");
alert(myId);
</script>
</body></html>
![]()
Without faith, nothing is possible. With it, nothing is impossible
http://ilwebdifabio.it