Job Recruitment Website - Property management - Seek the code about the drop-down box! !
Seek the code about the drop-down box! !
==============================
& lthtml & gt
& lthead & gt
& lt/head & gt;
& ltbody & gt
& lt scripting language = "JavaScript">
& lt! -
//First Dimension: the value of the first drop-down list.
//Second dimension: indicates the string seen in the drop-down list.
//The third dimension: indicates the value in the drop-down list.
var subcat = new Array();
//If the value of the category is dynamic, it can be retrieved from the database and set as follows.
//subcat[& lt; % = count%>] = new array ('<% = trim(RS(" leemaid ")%>;)%>' ,' & lt% = RS(" leemacontent nt ")% & gt;' ,' & lt% = RS(" leemacontent ")% & gt;' );
Subcat[0] = new array ('1',' TV',' = 1')
Subcat [1] = new array ('1',' electric fan',' =2')
Subcat[2] = new array ('1',' rice cooker',' =3')
Subcat[3] = new array ('1',' electric cooker',' =4')
Subcat[4] = new array ('1',' electric light',' =5')
Subcat[5] = new array ('1',' computer',' =6')
Subcat[6] = new array ('1',' refrigerator',' =7')
Subcat[7] = new array ('1',' washing machine',' =8')
Subcat[8] = new array ('1',' microwave oven',' =9')
Subcat [9] = newarray (' 1 ',' VCD player ',' = 1 ')
Subcat[ 10] = new array ('2',' diode',' =1')
Subcat [1 1] = new array ('2',' triode',' = 12')
Subcat [12] = newarray ('2',' CMOS integrated module',' = 13')
Subcat[ 13] = new array ('2',' resistance',' = 14')
Subcat[ 14] = new array ('2',' capacitance',' = 15')
Subcat[ 15] = new array ('2',' rectifier diode',' = 16')
Subcat[ 16] = new array ('2',' rectifier bridge',' = 17')
Subcat[ 17] = new array ('2',' SCR',' = 18')
Subcat[ 18] = new array ('2',' electron gun',' = 19')
Subcat[ 19] = new array ('2',' photodiode',' =2')
Subcat[20] = new array ('3',' ffffff',' vvvvvv')
Subcat[2 1] = new array ('3',' dddddd',' ffffff')
Function change selection 1 (selection value)
{
document . form 1 . S2 . length = 0; //Initialize the drop-down list and empty the drop-down data.
//document.form1.s2.options [0] = newoption ('Please select a secondary subclass',''); //Give the first value
for(I = 0; I & ltsubcat.lengthi++)//legth=2
{
If (subcat [I] [0] = = selected value)/[0] [1] first column and second column.
{
document . form 1 . S2 . options[document . form 1 . S2 . length]= new Option(subcat[I][ 1],subcat[I][2]);
}
}
}
//-& gt;
& lt/script & gt;
& ltform name="form 1 " >
Secondary link:
& ltselect name = " s 1 " onChange = " changeselect 1(this . value)" & gt;
& lt Options & gt Please select a first-level category.
& ltoption value=" 1 "> household appliances
< option value = "2" > electronic components
& ltoption value="3 " >ddddd & lt/option & gt;
& lt/select & gt;
& ltselect name = " S2 " onChange = " alert(this . value)" & gt;
& lt Options & gt Please select a secondary subcategory.
& lt/select & gt;
& lt/form & gt;
& lt/html & gt;
- Related articles
- What level of property is Zhong Jian Yipin Real Estate?
- The property fee for living here
- What about Shanghai Jinlin Real Estate Co., Ltd.?
- The fifth grade composition tour guide word Country Garden Baicheng is about 500 words.
- Is it difficult to park in Shenzhen Santai Danhua Phase IV store? How to calculate the floor area ratio?
- Lin Shuqing's work-related
- What is the telephone number of Luoyang Tongsheng Jianye Longcheng Phase III Marketing Center?
- How about Shaanxi Shangluo Hengshengyuan Industrial Co., Ltd.?
- Five work summary reports in the first half of 2022
- Do shops have to pay property fees?