I am just a beginnerin javascript,so pls need your help!
I am making a website using html.I need to capture a value from a textfield of one form in a page and use the value in an if-else loop in javascript in another page.
How to capture the value that would be given by any user and use the value to run the loop to display certain information to the user according to the value? And where should I put the script in the head section or the body section?

I have made the form as-
<form action="tariff2.html">
<center><b>Connected load:
<input type="text" name="load" size="30"></b></center>
<center><br><br><br>
<input type="submit" name="Submit" value=" Submit "
onKeyPress="return submitenter(this,event)">
<input type="reset" name="Reset" value=" Reset "></center>
And the script as-
<script type="text/javascript" language="javascript">
var ld = load.value;
if (ld<10)
{
document.write("<b>Consumer's Category: Domestic-A</b>");
}
else if (ld>10 && ld<20)
{
document.write("<b>Consumer's Category: Domestic-B</b>");
}
else
{
document.write("<b>Consumer's Category: Commercial</b>");
}
Any help would be appreciated



