I need to auto-fill an input

Asked

Viewed 59 times

3

Good afternoon, I would like help to make a self fill

document.getElementsByClassName('nightlife_drug_quantity')[0];

I need you to always complete this with number 50.

1 answer

3


Just add value="50" right into html. If you want it not to be editable just add a readonly. Or by js, like the previous comment. Example:

<input type="text" class="nightlife_drug_quantity" value="50" readonly>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.