How to use the select tag in HTML
This article mainly shows you "how to use select tags in HTML", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use select tags in HTML" this article.
1. Basic usage:
Volvo
Saab
Opel
Audi
Among them, the tag can be omitted and used in the page.
All
Network Learning Center of Hubei Radio and TV University
Online Learning Center of Chengdu normal University
Network Learning Center of Wuhan Vocational and Technical College
Second, you can select more than one Select element, as shown in the following code:
/ / if there is a multiple attribute, you can select more than one.
high school
University
doctor
/ / there is no multiple attribute below. Only one item is displayed. You cannot select more than one attribute.
high school
University
doctor
/ / the following is the case where the size attribute is set. If size=3 is set, then three pieces of data are displayed. Note that you cannot select more than one.
Primary school
Junior middle school
high school
Technical secondary school
Junior college
Undergraduate course
Graduate student
doctor
Postdoctoral
Please select
1. Determine whether there is an Item of the specified value in the select option
@ paramobjSelectId the id of the target select component to be verified
The value that @ paramobjItemValue will verify whether it exists
FunctionisSelectItemExit (objSelectId,objItemValue) {
VarobjSelect=document.getElementById (objSelectId)
VarisExit=false
If (nullroomroomobjSelectautomatically automatically typed of (objSelect)! = "undefined") {
For (vari=0;i