javascript - js wont show result of calculation -


quick newbie question, i'm sure simple you, cant head around figure out why code wont work. checked online, seems i'm doing fine, still wont work... i'm trying do, make simple calc , display in diff field. have tryed external , internal js. here's code:

<script type="text/javascript">     function calculate(){     var = document.calculate.first.value;     var b = document.calculate.second.value;     var c = parseint(a) + parseint(b);     document.calculate.result.value = c;     } </script>   <body>     <form name="calculate">         <input type="text" name="first" size="5">         <input type="text" name="second" size="5">         <input type="button" onclick="calculate()">         <input type="text" name="result" id="result" size="5">     </form> </body> 

chrome says:

uncaught typeerror: object not function (onclick) 

give different name form , onclick handler! here test.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -