Hello everyone I am new to Java and my teacher goes way too fast in class and am a day behind on this calculator. Our assignment is to make a Calculator using AppendDigit and Else if functions in the java code. Some of my other code in html may be messed up as well. I am just lost so here is the
HTML:

Code:
 <title>John's Calculator</title>
	<style type="text/css">
		.rt {text-align:right; font-family: Courier New;}
		.numbttn {text-align: center; background-color: 
		silver; font-family: Courier New; width 4eM;}
		body {background-color: silver}
		
	</style>
	
	<script type="text/javascript" src="cal.js"></script>

</head>

<body>
<form name="kpd">

<table>
<tr> <TABLE BORDER=4>
<TR>
<TD>
<INPUT TYPE="text"   NAME="Input" Size="16">
<br>
</TD>
</TR>
<TR>
<TD> <INPUT class="numbttn" TYPE="button" NAME="one"   VALUE="  1  " OnClick="AppendDigit('1')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="two"   VALUE="  2  " OnCLick="AppendDighit('2')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="three" VALUE="  3  " OnClick="AppedndDigit('3')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="plus"  VALUE="  +  " OnClick="AppendDigit('+')";/></td>
</tr>

<tr>
<td> <INPUT class="numbttn" TYPE="button" NAME="four"  VALUE="  4  " OnClick="AppendDigit('4')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="five"  VALUE="  5  " OnCLick="AppendDigit('5')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="six"   VALUE="  6  " OnClick="AppendDigit('6')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="minus" VALUE="  -  " OnClick="AppendDigit(' - ')";/></td>
</tr>


<tr>
<td> <INPUT class="numbttn" TYPE="button" NAME="seven" VALUE="  7  " OnClick="AppendDigit('7')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="eight" VALUE="  8  " OnCLick="AppendDigit('8')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="nine"  VALUE="  9  " OnClick="AppendDigit('9')";/></td>
<td> <INPUT class="numbttn" TYPE="button" NAME="times" VALUE="  x  " OnClick="AppendDigit(' * ')";/></td>
</tr>

 <tr> 
<td> <Input class="numbttn" TYPE="button" NAME="clear" VALUE="c" OnClick="AppendDigit('')";/></td>
<td> <Input class="numbttn" TYPE="button" NAME="zero"  VALUE="0" OnClick="AppendDigit('0')";/></td>
<td> <Input class="numbttn" TYPE="button" NAME="DoIt"  VALUE="=" OnClick="AppendDigit('=')";/></td>
<td> <Input  class="numbttn"TYPE="button" NAME="div"   VALUE="/" OnClick="AppendDigit(' / ');"/></td>
</r>
</table>
</form>
</body>

</html>
and Here is the pathetic Javascript which I have barely started:

Code:
// cal Applet- John Falco- 20 October 2010

 function clear TB() {
	document.form.kpd.display.value="0";
 }
 
 function AppendDigit (x) {
	if (x==".") {
		if ((!HasDecimal))
	}
	else {
	document.forms.kpd.display.value = 
			document.forms.kdp.display.value + X;
};