Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
JavaScript
<title>JavaScript Forms



function compute()
{
two=2
var a=parseFloat(document.answer.area.value)
var b=(Math.PI)*a*a
var c=parseFloat(2)*parseFloat(num1)+parseFloat(D)
var d=parseFloat(2)*parseFloat(num2)
document.answer.area.value=b
document.answer.perimeter.value=c

}





Enter Length and width then click <br><br>
Length<br><br>
Width<br><br>
Area<br><br>
Perimeter<br>


What I have tried:

I tried renaming it still nothing
Posted
Updated 9-May-21 0:32am
v4
Comments
[no name] 9-May-21 7:16am    
Include the full code, so we can see how to help. Html part, how are you submitting it??
Richard MacCutchan 9-May-21 7:20am    
Where are num1, D and num2 defined?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900