<input id='year' type="text" value=""> <script> document.getElementById('year').value = (new Date()).getFullYear(); </script>