function show(t){ if(document.getElementById("tb").getAttribute("value")) document.getElementById("tb").setAttribute("value", document.getElementById("tb").getAttribute("value") + t); else document.getElementById("tb").setAttribute("value", t); } function