<SCRIPT language="JavaScript" type="text/javascript">
<!--
function ShowI() {
var el=document.getElementById("str");
var i=el.value;
alert(i);
}
//-->
</SCRIPT>
<form>
<input type='text' name='str' id='str'>
<input type='button' onClick='ShowI();'>
</form>
input & JavaScript
Подскажите плз!!!
Код:
<SCRIPT language="JavaScript" type="text/javascript">
<!--
function ShowI(dir) {
var i=dir.str.value;
alert(i);
}
//-->
</SCRIPT>
<form>
<input type='text' name='str'>
<input type='button' onClick='ShowI(this.form);'>
</form>
<!--
function ShowI(dir) {
var i=dir.str.value;
alert(i);
}
//-->
</SCRIPT>
<form>
<input type='text' name='str'>
<input type='button' onClick='ShowI(this.form);'>
</form>