you need to use parseint or parse float if the values can be decimals
you should also check that the data entered is numeric only
<html>
<head></head>
<body>
<form name=formulari>
<input type=text name=xd1>
<input type=text name=xd2>
<input type=text name=xd3>
<input type=button value="Hola" name=xd4 onclick="xd3.value=parseFl
</form>
</body>
</html>
Main Topics
Browse All Topics





by: devicPosted on 2004-01-01 at 10:34:36ID: 10025921
<input type=button value="Hola" name=xd4 onclick="document.formular i.xd3.valu e=document .formulari .xd1.value *1 + document.formulari.xd2.val ue*1;" >