亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1252 | 回復(fù): 0
打印 上一主題 下一主題

ajax實(shí)現(xiàn)無刷屏級(jí)聯(lián)下拉框 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2007-07-02 23:45 |只看該作者 |倒序?yàn)g覽

1

      
2

            http_request=null;
3

            function doAJAX()
4


            

{
5

            if (window.XMLHttpRequest)
6


            

{
7

                http_request=new XMLHttpRequest();
8

            }
9

            else (window.ActiveXObject)
10


            

{
11

                http_request=new ActiveXObject("Microsoft.XMLHTTP");
12

            }
13

            http_request.onreadystatechange = GetDate;
14

              var S = document.Form1.select1.value;
15

              alert(S);
16

              var url='WebForm2.aspx?sABC='+escape(S);
17

              
18

           http_request.open('POST',url,true);
19

           var dataSet='sABC='+escape(S);
20

           http_request.send(null);
21

           }
22

            function GetDate()
23


            

{
24

              if (http_request.readyState==4)
25


            

{
26

                if(http_request.status==200)
27


               

{   
28

                    
29

                   var a= http_request.responseText.split(",");
30

                //清空原來的OPTIONS
31

                 var nL = document.Form1.select2.options.length;
32

                   while(nL>1)
33


                  

{
34

                        alert(document.Form1.select2.options.length);
35

                        document.Form1.select2.remove(document.Form1.select2.options.length-1);
36

                        nL = document.Form1.select2.options.length;
37

                   }
38

                   for(i=0;ia.length;i++)
39


                  

{
40

                   var opt=new Option();  
41

                   opt.value=a    ;
42

                   opt.text=a;
43

                   var sel1Object = document.Form1.select2;
44

                   sel1Object.add(opt);
45

                   }
46

                  
47

               }
48

               }
49

            }
50

            
51

      
52


1

        private void Page_Load(object sender, System.EventArgs e)
2


        

{
3

            string str;
4

            // 在此處放置用戶代碼以初始化頁面
5

           string li= this.Request.Headers.ToString();
6

            this.Request.Headers.GetValues(0);
7

            if(Request.QueryString["sABC"]!=null)
8


            

{
9

                string aaa="";
10

                str = Request.QueryString["sABC"].ToString();
11

            
12

                ajaxDAL.Class1 test = new Class1();
13

                ArrayList al = test.Test(str);
14

                for(int i =0;ial.Count;i++)
15


               

{
16

                    aaa+= al.ToString()+",";
17

                }
18

                aaa = aaa.Remove(aaa.Length-1,1);
19

                Response.Write(aaa);
20

                Response.End();
21

            }
22

        }
23

24

25

        public ArrayList Test(string s)
26


        

{
27

            ArrayList al = new ArrayList();
28

            if(s=="美亞在線")
29


            

{
30

                al.Add("市場部");
31

                al.Add("開發(fā)部");
32

            }
33

            if(s=="美亞商旅")
34


            

{
35

                al.Add("商旅中心");
36

                al.Add("物流部");
37

            }
38

            return al;
39

        }
40



本文來自ChinaUnix博客,如果查看原文請點(diǎn):http://blog.chinaunix.net/u/10945/showart_332777.html
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP