<head>
<SCRIPT language = JavaScript>
function calculate() {
C = document.frmOne.txtFirstNumber.value
D = C.length
document.frmOne.txtThirdNumber.value = D
}
</SCRIPT>
</head>
<center>
<FORM NAME = frmOne>
Text: <INPUT TYPE = Text NAME = txtFirstNumber SIZE = 100 value ="">
<P>
Length: <INPUT TYPE = Text NAME = txtThirdNumber SIZE = 5 value = "">
<P>
<Input Type = Button NAME = b1 VALUE = "Add Numbers" onClick = calculate()>
</FORM>
</center>
No comments:
Post a Comment