<form action="#"> <input id="test" value="" /> </form> <script type="text/javascript"> text = document.getElementById("test").value; alert(text); text = "test"; </script>
obj = document.getElementById("test"); obj.value = "test";