<html> <head> <script type="text/javascript"> var fdf = document.getElementById('marcador').value; alert(fdf); </script> </head><body> <input type="text" value="1" id="marcador" > </body></html>