Membuat Kalkulator di Blogspot

Demo :









Cara membuatnya

Dari Dashboard >> Design >> Edit HTML.


Penempatannya
dibawah <body>
........
diatas </body>

<form name='Calc'>
<table border='4'>
<tbody><tr>
<td>
<input type='text' size='16' name='Input' gtbfieldid='2' />
<br/>
</td>
</tr>
<tr>
<td>
<input type='button' onclick='Calc.Input.value += "1"' value='  1  ' name='one' />
<input type='button' onclick='Calc.Input.value += "2"' value='  2  ' name='two' />
<input type='button' onclick='Calc.Input.value += "3"' value='  3  ' name='three' />
<input type='button' onclick='Calc.Input.value += " + "' value='  +  ' name='plus' />
<br/>
<input type='button' onclick='Calc.Input.value += "4"' value='  4  ' name='four' />
<input type='button' onclick='Calc.Input.value += "5"' value='  5  ' name='five' />
<input type='button' onclick='Calc.Input.value += "6"' value='  6  ' name='six' />
<input type='button' onclick='Calc.Input.value += " - "' value='  -  ' name='minus' />
<br/>
<input type='button' onclick='Calc.Input.value += "7"' value='  7  ' name='seven' />
<input type='button' onclick='Calc.Input.value += "8"' value='  8  ' name='eight' />
<input type='button' onclick='Calc.Input.value += "9"' value='  9  ' name='nine' />
<input type='button' onclick='Calc.Input.value += " * "' value='  x  ' name='times' />
<br/>
<input type='button' onclick='Calc.Input.value = ""' value='  c  ' name='clear' />
<input type='button' onclick='Calc.Input.value += "0"' value='  0  ' name='zero' />
<input type='button' onclick='Calc.Input.value = eval(Calc.Input.value)' value='  =  ' name='DoIt' />
<input type='button' onclick='Calc.Input.value += " / "' value='  /  ' name='div' />
<br/>
</td>
</tr>
</tbody></table>
</form>



Credit : JavaScript Kit

Alhamdulillah

0 comments:


Posting Komentar


Creative Commons License
Membuat Kalkulator di Blogspot by Nano Yulianto is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at http://nanoyulianto.blogspot.com/2011/01/membuat-kalkulator-di-blogspot.html.
Permissions beyond the scope of this license may be available at http://nanoyulianto.blogspot.com/.