<script> alert( document.getElementById("test") ); </script> <input id="test"> <script> alert( document.getElementById("test") ); </script>