<html>
<head>
<script type="text/javascript">
function whatever()
{
document.getElementById('whatever').value = 'kecske';
}
</script>
</head>
<body>
<form onsubmit="return false">
<textarea id="whatever"></textarea>
<button onclick="whatever()">Whatever</button>
</form>
</body>
</html> Klikk.Unhandled Error: 'whatever' is not a function <html>
<head>
<script type="text/javascript">
function whatever()
{
document.getElementById('whatever1').value = 'kecske';
}
</script>
</head>
<body>
<form onsubmit="return false">
<textarea id="whatever1"></textarea>
<button onclick="whatever()">Whatever</button>
</form>
</body>
</html> Klikk. És ez meg megy. Egy funkció neve összeakad egy tag azonosítójával! Most mondjátok meg, hát van nagyob hulladék, mint a JS?! |