HOW TO MAKE CALCULATOR
Its simple to make your own calculator. You can use that in blog or website or save it on Computer's HDD to use offline.
lets see how to make a calculator.
Just copy below code & paste it into HTML/JavaScript widget in blog or website for creating an online calculator
OR
Open notepad
Copy & paste below script
Save file as .html
For exp : calculator.html
( save as type : All Files Encoding : ANSI )
lets see how to make a calculator.
Just copy below code & paste it into HTML/JavaScript widget in blog or website for creating an online calculator
OR
Open notepad
Copy & paste below script
Save file as .html
For exp : calculator.html
( save as type : All Files Encoding : ANSI )
CODE TO CREATE CALCULATOR
<FORM
NAME="Calculator">
<TABLE BORDER=1>
<TR>
<TD>
<INPUT TYPE="text" NAME="Input" Size="16">
<br>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="button" NAME="one" VALUE=" 1 " OnClick="Calculator.Input.value += '1'">
<INPUT TYPE="button" NAME="two" VALUE=" 2 " OnCLick="Calculator.Input.value += '2'">
<INPUT TYPE="button" NAME="three" VALUE=" 3 " OnClick="Calculator.Input.value += '3'">
<INPUT TYPE="button" NAME="plus" VALUE=" + " OnClick="Calculator.Input.value += ' + '">
<br>
<INPUT TYPE="button" NAME="four" VALUE=" 4 " OnClick="Calculator.Input.value += '4'">
<INPUT TYPE="button" NAME="five" VALUE=" 5 " OnCLick="Calculator.Input.value += '5'">
<INPUT TYPE="button" NAME="six" VALUE=" 6 " OnClick="Calculator.Input.value += '6'">
<INPUT TYPE="button" NAME="minus" VALUE=" - " OnClick="Calculator.Input.value += ' - '">
<br>
<INPUT TYPE="button" NAME="seven" VALUE=" 7 " OnClick="Calculator.Input.value += '7'">
<INPUT TYPE="button" NAME="eight" VALUE=" 8 " OnCLick="Calculator.Input.value += '8'">
<INPUT TYPE="button" NAME="nine" VALUE=" 9 " OnClick="Calculator.Input.value += '9'">
<INPUT TYPE="button" NAME="times" VALUE=" x " OnClick="Calculator.Input.value += ' * '">
<br>
<INPUT TYPE="button" NAME="clear" VALUE=" c " OnClick="Calculator.Input.value = ''">
<INPUT TYPE="button" NAME="zero" VALUE=" 0 " OnClick="Calculator.Input.value += '0'">
<INPUT TYPE="button" NAME="DoIt" VALUE=" = " OnClick="Calculator.Input.value = eval(Calculator.Input.value)">
<INPUT TYPE="button" NAME="div" VALUE=" / " OnClick="Calculator.Input.value += ' / '">
<br>
</TD>
</TR>
</TABLE>
</FORM>
<TABLE BORDER=1>
<TR>
<TD>
<INPUT TYPE="text" NAME="Input" Size="16">
<br>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="button" NAME="one" VALUE=" 1 " OnClick="Calculator.Input.value += '1'">
<INPUT TYPE="button" NAME="two" VALUE=" 2 " OnCLick="Calculator.Input.value += '2'">
<INPUT TYPE="button" NAME="three" VALUE=" 3 " OnClick="Calculator.Input.value += '3'">
<INPUT TYPE="button" NAME="plus" VALUE=" + " OnClick="Calculator.Input.value += ' + '">
<br>
<INPUT TYPE="button" NAME="four" VALUE=" 4 " OnClick="Calculator.Input.value += '4'">
<INPUT TYPE="button" NAME="five" VALUE=" 5 " OnCLick="Calculator.Input.value += '5'">
<INPUT TYPE="button" NAME="six" VALUE=" 6 " OnClick="Calculator.Input.value += '6'">
<INPUT TYPE="button" NAME="minus" VALUE=" - " OnClick="Calculator.Input.value += ' - '">
<br>
<INPUT TYPE="button" NAME="seven" VALUE=" 7 " OnClick="Calculator.Input.value += '7'">
<INPUT TYPE="button" NAME="eight" VALUE=" 8 " OnCLick="Calculator.Input.value += '8'">
<INPUT TYPE="button" NAME="nine" VALUE=" 9 " OnClick="Calculator.Input.value += '9'">
<INPUT TYPE="button" NAME="times" VALUE=" x " OnClick="Calculator.Input.value += ' * '">
<br>
<INPUT TYPE="button" NAME="clear" VALUE=" c " OnClick="Calculator.Input.value = ''">
<INPUT TYPE="button" NAME="zero" VALUE=" 0 " OnClick="Calculator.Input.value += '0'">
<INPUT TYPE="button" NAME="DoIt" VALUE=" = " OnClick="Calculator.Input.value = eval(Calculator.Input.value)">
<INPUT TYPE="button" NAME="div" VALUE=" / " OnClick="Calculator.Input.value += ' / '">
<br>
</TD>
</TR>
</TABLE>
</FORM>