js:
function fnShow() { with(document.getElementById("txtA")) { alert(value); } }
html:
<input type="text" id="txtA" name="txtA" value="aaaa"> <input type="button" value="btnA" οnclick="fnShow()">