<input class="input" type="text" id="con" /> <script> function input(){ var one=document.getElementById("con").value; alert(one); } </script>