Text formatted with Texy:
var x = document.getElementsByTagName(‘h2’); for (i=0;x && i
< x.length; i++) { var odkaz = “<a href=\”#“+ x[i].id
+”\“>”+ x[i].innerHTML +“
”;
document.write(odkaz);
}
Generated HTML code:
<div><script type="text/javascript"></script></div>
<p>var x = document.getE­lementsByTagNa­me(‘h2’); for (i=0;x && i
< x.length; i++) { var odkaz = “<a href=\”#“+ x[i].id
+”\“>”+ x[i].innerHTML +“<br>
”;<br>
document.write(od­kaz);<br>
}</p>
<div></div>
Verze Texy: 3.2.3 (konfigurace)