test it in fire fox <script type="text/javascript"> function test() { var x = document.getElementById("xx"); alert(x.value); } </script> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <input name="xx" value="asd"> <input id="asd" value="qwe" onclick="test();" type="button"/> </form>