Html Select uses the selected attribute to set the default selection

不言
Release: 2018-05-08 14:51:16
Original
4043 people have browsed it

This article mainly introduces how to use the selected attribute to set the default selection in Html Select. It has certain reference value. Now I share it with you. Friends in need can refer to it.

How to make the default selection in Html Select , as long as you add the selected = "selected" attribute to an option, it will be the default option. The following is an example. I hope it will be helpful to everyone.

Adding the selected = "selected" attribute to an option will be the default option.
For example :

##Copy code##The code is as follows:

Copy after login

Then "Pass" is selected by default ##.

#

The above is the detailed content of Html Select uses the selected attribute to set the default selection. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!