Czy znacie jeszcze jakieś dodatkowe sposoby przekazywania zmiennej
w pole input,
jeżeli tak to dodajcie to do tego skryptu.
Kod
<html>
<head>
<script type="text/javascript">
function c()
{
a = 100;
document.getElementById ('wynik').value = ( a );
document.h.h1.value = ( a );
}
</script>
</head>
<BODY onload=c();>
<form name=h >
<input type="text" id="wynik"/>
<br>
<br>
<INPUT readOnly name=h1>
</form>
</body>
</html>
<head>
<script type="text/javascript">
function c()
{
a = 100;
document.getElementById ('wynik').value = ( a );
document.h.h1.value = ( a );
}
</script>
</head>
<BODY onload=c();>
<form name=h >
<input type="text" id="wynik"/>
<br>
<br>
<INPUT readOnly name=h1>
</form>
</body>
</html>