Javascript - fill in the textbox dynamically

Viewed 11504

Is it possible to fill textbox using javascript? I have this code

<input type="text" id="output">

After using the script, I want to have selected value in textbox. I'm very new to javascript and I tried this

javascript: document.getElementById('output').innerHTML = "100";

However, it doesn't work as I expected. So after using the script I want HTML look like

<input type="text" id="output" value="100">

Is there any way to manage this? Thanks

1 Answers
Related