Home>Article>Web Front-end> How to set default value for drop-down box in JS?
#How to set the default value for the drop-down box in JS?
First create a standard HTML5 document;
Document
Then add a drop-down box in the document;
Then introduce jQuery into the page;
Finally write the script tag in the page, and use jQuery in the tag to set the value of the drop-down box to the default value.
Recommended tutorial: "JS Tutorial"
The above is the detailed content of How to set default value for drop-down box in JS?. For more information, please follow other related articles on the PHP Chinese website!