0

So I want to enter something in an <input> element on a website, but I can't find any info on how to do it. I tried something like this:

document.getElementById('id').input('Hello World')

But there is no command called .input(), but I hope this shows what I want to achieve.

1 Answer 1

2

You need to use .value

document.getElementById('id').value = 'Hello World';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.