<body> <input type = "text" id = "sample"></input> <script> document.getElementById("sample").value = "new"; </script> </body>