Brak mi już cierpliwości...
Dlaczego ten pierwszy kod działa a ten drugi nie?
<html>
<head>
<script type="text/javascript">
function ustawCzcionke()
{
rozmiar=document.getElementById("poleTekstowe").value;
element=document.getElementById("1");
element.style.fontSize=rozmiar+"px";
}
function ustawCzcionke1()
{
element=document.getElementById("2");
element.style.fontSize=65+"px";
}
</script>
<meta charset="utf-8">
<title></title>
</head>
<body>
<input type="text" id="poleTekstowe"/>
<p id="1">A łyżka na to:"To niemożliwe..."</p>
<input type="button" value="Kliknij mnie" onclick="ustawCzcionke()"/>
<p id="2" onclick="ustawCzionke1()">Zosia</p>
</body>
</html>
Jak zrobić aby to działało?
dodanie znaczników <code class="html"> - furious programming