Home > front end >  How to keep options unchanged after asp web page submit
How to keep options unchanged after asp web page submit

Time:12-04

Linkage menu, the first level is achieved by accepting data such as JCZ.=the request Form (" select1 ")
Pop music & lt;/OPTION>
2 how to remain the same? Please give advice or comments!!!!!!!!!!







<script LANGUAGE="JavaScript" & gt;
Var l=document. F1. Select1. Options. Length;
//the first drop-down menu option number
Var group=new Array (l)
//according to the number of build array
for (i=0; i//an array of each element is an array
Group [I]=new Array ()
//the next creation options, as the second drop-down menu definition content
Group [0] [0]=new Option (" CNTV ", "http://www.cntv.cn")
Group [0] [1]=new Option (" music paradise ", "#")
Group [0] [2]=new Option (" sogou music ", "http://mp3.sogou.com/")

Group [1] [0]=new Option (" web page special effects ", "/JSCSS")
Group [1] [1]=new Option (" white deer academy ", "http://www.readlink.net")

Group [2] [0]=new Option (" hua jun software park ", "http://www.newhua.com")
Group [2] [1]=new Option (" sohu download ", "http://it.sohu.com/download/")
Group [2] [2]=new Option (" Chinese download ", "http://www.download.com.cn")

Var selobj=document. F1. Select2;//set to dynamic change of the object is the second drop-down menu

The function set_list (x)//x represents the first menu is selected content
{
For (m=selobj. Options. Length - 1. M> 0; M -)//to remove the second menu options
Selobj. Options [m]=null

for (i=0; i//according to the first selected number of menu, plexus extract menu option in the menu control array
Selobj. Options [I]=group [x] [I]
//here you can also create new objects, such as: selobj. Options [I]=new Option (group [x] [I] text, group [x] [I] value)
}
Selobj. Options [0]. Selected=true
//selected option # 0
}
The function the go () {
//this function is used to set the window to navigate to the URL specified
Location=selobj. Options [selobj selectedIndex]. Value
}
</script>

CodePudding user response:

<% if JCZ="pop music" then % & gt; Selected & lt; % end if % & gt;
So just write ah, the secondary TAB of the premise is you need to pass level id binding

CodePudding user response:

<% if JCZ="pop music" then the response. The Write (" Selected ") end if % & gt;
  •  Tags:  
  • ASP
  • Related