<title>Simple calculator</title>
<textarea style="width:50%" id="demo" name="txt"></textarea>
<br>
<input type = "button" value = "0" onclick = "demo.value += '0' ">
<input type = "button" value = "1" onclick = "demo.value += '1' ">
<input type = "button" value = "2" onclick = "demo.value += '2' ">
<input type = "button" value = "3" onclick = "demo.value += '3' ">
<input type = "button" value = "4" onclick = "demo.value += '4' ">
<input type = "button" value = "5" onclick = "demo.value += '5' "><br>
<input type = "button" value = "6" onclick = "demo.value += '6' ">
<input type = "button" value = "7" onclick = "demo.value += '7' ">
<input type = "button" value = "8" onclick = "demo.value += '8' ">
<input type = "button" value = "9" onclick = "demo.value += '9' ">
<input type = "button" value = "+" onclick = "demo.value += '+' ">
<input type = "button" value = "-" onclick = "demo.value += '-' "><br>
<input type = "button" value = "*" onclick = "demo.value += '*' ">
<input type = "button" value = "/" onclick = "demo.value += '/' ">
<input type = "button" value = "=" onclick = "demo.value ='Jibu ni: '+eval(demo.value) ">
<input type = "button" value = "." onclick = "demo.value += '.' ">
<input type = "button" value = "C" onclick = "demo.value = '' ">
<input type = "button" value = "(" onclick = "demo.value += '(' ">
<input type = "button" value = ")" onclick = "demo.value += ')' ">
Katika mifano hiyo tumeona jinsi inavyotumika value ili kupata thamani au input. Sasa ngoja tuone jinsi ya kupata id, type na name.