<script>alert( document.getElementById('inp') )</script> <input id="inp"> <script>alert( document.getElementById('inp') )</script>