<span onclick="co tu powinno być ?">Zmień Test na treść 'przyklad'</span>
<html> <head> <script type="text/javascript"> function doIt() { var oHeaders = document.getElementById("head").firstChild; oHeaders.nodeValue = "przyklad"; } function doIt2() { var oHeaders = document.getElementsByTagName("h2"); oHeaders[0].firstChild.nodeValue = "przyklad"; } </script> </head> <body> </body> </html>