Skip to content

Instantly share code, notes, and snippets.

@tdouce
Created February 23, 2010 21:13
Show Gist options
  • Save tdouce/312715 to your computer and use it in GitHub Desktop.
Save tdouce/312715 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
var x= document.getElementById('txtArea').value;
function calrwh(area){
var vol=area*365*24*60*60
alert("You can capture" + vol + " gallons from your roof annually!")
}
calsecs(x)
</script>
</head>
<body>
<form name='formOne'>
Area: <input type='text' id='txtArea' value=''/><br/>
<input type='button' onClick='calrwh(x)' value='calculate'/>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment