无刷新三级联动菜单从数据库获取数据(适用于fir
	
		
		系统
		
		2530 0
	
	
	  
  
                表单叶面 
  
  
    
       <
      
      
        script
      
      
        language
      
      
        ="javascript"
      
      
        src
      
      
        ="include/selectoption.js"
      
      
        ></
      
      
        script
      
      
        >
      
        <
      
      
        script
      
      
        language
      
      
        ="javascript"
      
      
        src
      
      
        ="include/selectoption.js"
      
      
        ></
      
      
        script
      
      
        >
      
      
        
         
        
         <
      
      
        select
      
      
        name
      
      
        ="privceid"
      
      
        id
      
      
        ="privceid"
      
      
        onchange
      
      
        ="editnextselect(this,'cityid');"
      
      
        >
      
      
        <
      
      
        select
      
      
        name
      
      
        ="privceid"
      
      
        id
      
      
        ="privceid"
      
      
        onchange
      
      
        ="editnextselect(this,'cityid');"
      
      
        >
      
      
        
         <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        
         </
      
      
        select
      
      
        >
      
      
        省
      
      
        </
      
      
        select
      
      
        >
      
      
        省
        
         <
      
      
        select
      
      
        name
      
      
        ="cityid"
      
      
        id
      
      
        ="cityid"
      
      
        onchange
      
      
        ="editnextselect(this,'county');"
      
      
        >
      
      
        <
      
      
        select
      
      
        name
      
      
        ="cityid"
      
      
        id
      
      
        ="cityid"
      
      
        onchange
      
      
        ="editnextselect(this,'county');"
      
      
        >
      
      
        
         <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        
         </
      
      
        select
      
      
        >
      
      
        市
      
      
        </
      
      
        select
      
      
        >
      
      
        市
        
         <
      
      
        select
      
      
        name
      
      
        ="county"
      
      
        id
      
      
        ="county"
      
      
        >
      
      
        <
      
      
        select
      
      
        name
      
      
        ="county"
      
      
        id
      
      
        ="county"
      
      
        >
      
      
        
         <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        <
      
      
        option
      
      
        value
      
      
        ="-1"
      
      
        >
      
      
        请选择
      
      
        </
      
      
        option
      
      
        >
      
      
        
         </
      
      
        select
      
      
        >
      
      
        区/县
      
      
        </
      
      
        select
      
      
        >
      
      
        区/县
        
         
        
         
         <
      
      
        script
      
      
        language
      
      
        ="javascript"
      
      
        >
      
      
        ...
      
      
        <
      
      
        script
      
      
        language
      
      
        ="javascript"
      
      
        >
      
      
        ...
      
      
        
          
           var
        
        
          privceid
        
        
          =
        
        
        
        
          "
        
        
          <%=privceid%>
        
        
          "
        
        
          ;
        
        
          var
        
        
          privceid
        
        
          =
        
        
        
        
          "
        
        
          <%=privceid%>
        
        
          "
        
        
          ;
          
           var
        
        
          cityid
        
        
          =
        
        
        
        
          "
        
        
          <%=cityid%>
        
        
          "
        
        
          ;
        
        
          var
        
        
          cityid
        
        
          =
        
        
        
        
          "
        
        
          <%=cityid%>
        
        
          "
        
        
          ;
          
           var
        
        
          county
        
        
          =
        
        
        
        
          "
        
        
          <%=county%>
        
        
          "
        
        
          ;
        
        
          var
        
        
          county
        
        
          =
        
        
        
        
          "
        
        
          <%=county%>
        
        
          "
        
        
          ;
          
           getdatelist(
        
        
          '
        
        
          &pid=
        
        
          '
        
        
          ,privceid,
        
        
          '
        
        
          privceid
        
        
          '
        
        
          );
          getdatelist(
        
        
          '
        
        
          &pid=
        
        
          '
        
        
          ,privceid,
        
        
          '
        
        
          privceid
        
        
          '
        
        
          );
          
           
           if
        
        
          (cityid
        
        
          !=
        
        
        
        
          ""
        
        
          )
        
        
          ...
        
        
          
            {getdatelist(
          
          
            '
          
          
            &pid=
          
          
            '
          
          
            +
          
          
            privceid,cityid,
          
          
            '
          
          
            cityid
          
          
            '
          
          
            );}
        
        
          if
        
        
          (cityid
        
        
          !=
        
        
        
        
          ""
        
        
          )
        
        
          ...
        
        
          
            {getdatelist(
          
          
            '
          
          
            &pid=
          
          
            '
          
          
            +
          
          
            privceid,cityid,
          
          
            '
          
          
            cityid
          
          
            '
          
          
            );}
          
        
        
          
           
           if
        
        
          (county
        
        
          !=
        
        
        
        
          ""
        
        
          )
        
        
          ...
        
        
          
            {getdatelist(
          
          
            '
          
          
            &pid=
          
          
            '
          
          
          
          
            +
          
          
            cityid,county,
          
          
            '
          
          
            county
          
          
            '
          
          
            );}
        
        
          if
        
        
          (county
        
        
          !=
        
        
        
        
          ""
        
        
          )
        
        
          ...
        
        
          
            {getdatelist(
          
          
            '
          
          
            &pid=
          
          
            '
          
          
          
          
            +
          
          
            cityid,county,
          
          
            '
          
          
            county
          
          
            '
          
          
            );}
          
        
        
          
           
           function
        
        
          editnextselect(obj,nexselid)
        
        
          ...
        
        
          
            {
        
        
          function
        
        
          editnextselect(obj,nexselid)
        
        
          ...
        
        
          
            {
            
             
             if
          
          
            (nexselid
          
          
            ==
          
          
          
          
            '
          
          
            cityid
          
          
            '
          
          
            )
          
          
            ...
          
          
            
              {
          
          
            if
          
          
            (nexselid
          
          
            ==
          
          
          
          
            '
          
          
            cityid
          
          
            '
          
          
            )
          
          
            ...
          
          
            
              {
              
               selvalue
            
            
              =
            
            
              cityid;
              selvalue
            
            
              =
            
            
              cityid;
              
               
               }
            
          
          
            else
          
          
            ...
          
          
            
              {
              }
            
          
          
            else
          
          
            ...
          
          
            
              {
              
               selvalue
            
            
              =
            
            
              county;
              selvalue
            
            
              =
            
            
              county;
              
               }
              }
            
          
          
            
             var
          
          
            pid
          
          
            =
          
          
            obj.options[obj.selectedIndex].value;
          
          
            var
          
          
            pid
          
          
            =
          
          
            obj.options[obj.selectedIndex].value;
            
             
             if
          
          
            (pid
          
          
            !=
          
          
          
          
            null
          
          
            )
          
          
            ...
          
          
            
              {
          
          
            if
          
          
            (pid
          
          
            !=
          
          
          
          
            null
          
          
            )
          
          
            ...
          
          
            
              {
              
               getdatelist(
            
            
              '
            
            
              &pid=
            
            
              '
            
            
              +
            
            
              pid,selvalue,nexselid);
              getdatelist(
            
            
              '
            
            
              &pid=
            
            
              '
            
            
              +
            
            
              pid,selvalue,nexselid);
              
               }
              }
            
          
          
            
             }
            }
          
        
        
          
           </
      
      
        script
      
      
        >
        
      
      
        </
      
      
        script
      
      
        >
      
     
   
   js包含叶面 
  
  
    
       //
      
      
        JavaScriptDocument
      
        //
      
      
        JavaScriptDocument
      
      
        
         
         function
      
      
        InitAjax()
      
      
        ...
      
      
        
          {
      
      
        function
      
      
        InitAjax()
      
      
        ...
      
      
        
          {
          
           var
        
        
          ajax
        
        
          =
        
        
        
        
          false
        
        
          ;
        
        
          var
        
        
          ajax
        
        
          =
        
        
        
        
          false
        
        
          ;
          
           
           try
        
        
          ...
        
        
          
            {ajax
          
          
            =
          
          
          
          
            new
          
          
            ActiveXObject(
          
          
            "
          
          
            Msxml2.XMLHTTP
          
          
            "
          
          
            );}
        
        
          try
        
        
          ...
        
        
          
            {ajax
          
          
            =
          
          
          
          
            new
          
          
            ActiveXObject(
          
          
            "
          
          
            Msxml2.XMLHTTP
          
          
            "
          
          
            );}
          
        
        
          
           
           catch
        
        
          (e)
        
        
          ...
        
        
          
            {
        
        
          catch
        
        
          (e)
        
        
          ...
        
        
          
            {
            
             
             try
          
          
          
          
            ...
          
          
            
              {ajax
            
            
              =
            
            
            
            
              new
            
            
              ActiveXObject(
            
            
              "
            
            
              Microsoft.XMLHTTP
            
            
              "
            
            
              );}
          
          
            try
          
          
          
          
            ...
          
          
            
              {ajax
            
            
              =
            
            
            
            
              new
            
            
              ActiveXObject(
            
            
              "
            
            
              Microsoft.XMLHTTP
            
            
              "
            
            
              );}
            
          
          
            
             
             catch
          
          
            (E)
          
          
            ...
          
          
            
              {ajax
            
            
              =
            
            
            
            
              false
            
            
              ;}
          
          
            catch
          
          
            (E)
          
          
            ...
          
          
            
              {ajax
            
            
              =
            
            
            
            
              false
            
            
              ;}
            
          
          
            
             }
            }
          
        
        
          
           
           if
        
        
          (
        
        
          !
        
        
          ajax
        
        
          &&
        
        
        
        
          typeof
        
        
          XMLHttpRequest
        
        
          !=
        
        
          '
        
        
          undefined
        
        
          '
        
        
          )
        
        
          ...
        
        
          
            {ajax
          
          
            =
          
          
          
          
            new
          
          
            XMLHttpRequest();}
        
        
          if
        
        
          (
        
        
          !
        
        
          ajax
        
        
          &&
        
        
        
        
          typeof
        
        
          XMLHttpRequest
        
        
          !=
        
        
          '
        
        
          undefined
        
        
          '
        
        
          )
        
        
          ...
        
        
          
            {ajax
          
          
            =
          
          
          
          
            new
          
          
            XMLHttpRequest();}
          
        
        
          
           return
        
        
          ajax;
        
        
          return
        
        
          ajax;
          
           }
          }
        
      
      
        
         
         function
      
      
        datexml(url,value)
      
      
        ...
      
      
        
          {
      
      
        function
      
      
        datexml(url,value)
      
      
        ...
      
      
        
          {
          
           var
        
        
          number
        
        
          =
        
        
          Math.random();
        
        
          var
        
        
          number
        
        
          =
        
        
          Math.random();
          
           var
        
        
          url
        
        
          =
        
        
          url
        
        
          +
        
        
          "
        
        
          ?qaaq=
        
        
          "
        
        
        
        
          +
        
        
          number
        
        
          +
        
        
          value;
        
        
          var
        
        
          url
        
        
          =
        
        
          url
        
        
          +
        
        
          "
        
        
          ?qaaq=
        
        
          "
        
        
        
        
          +
        
        
          number
        
        
          +
        
        
          value;
          
           var
        
        
          ajax
        
        
          =
        
        
          InitAjax();
        
        
          var
        
        
          ajax
        
        
          =
        
        
          InitAjax();
          
           ajax.open(
        
        
          "
        
        
          GET
        
        
          "
        
        
          ,url,
        
        
          false
        
        
          );
           ajax.open(
        
        
          "
        
        
          GET
        
        
          "
        
        
          ,url,
        
        
          false
        
        
          );
          
           ajax.send(
        
        
          null
        
        
          );
           ajax.send(
        
        
          null
        
        
          );
          
           //
        
        
          ajax.onreadystatechange=function(){}
        
        
          //
        
        
          ajax.onreadystatechange=function(){}
        
        
          
           
           if
        
        
          (ajax.readyState
        
        
          ==
        
        
        
        
          4
        
        
        
        
          &&
        
        
          ajax.status
        
        
          ==
        
        
        
        
          200
        
        
          )
        
        
          ...
        
        
          
            {
          
          
            return
          
          
            ajax.responseText;}
        
        
        
        
          if
        
        
          (ajax.readyState
        
        
          ==
        
        
        
        
          4
        
        
        
        
          &&
        
        
          ajax.status
        
        
          ==
        
        
        
        
          200
        
        
          )
        
        
          ...
        
        
          
            {
          
          
            return
          
          
            ajax.responseText;}
          
        
        
          
           }
          }
        
      
      
        
         
         function
      
      
        getdatelist(values,selvalues,SelectName)
      
      
        ...
      
      
        
          {
      
      
        function
      
      
        getdatelist(values,selvalues,SelectName)
      
      
        ...
      
      
        
          {
          
           var
        
        
          getdate
        
        
          =
        
        
          datexml(
        
        
          "
        
        
          include/xmlgetp_c_c.asp
        
        
          "
        
        
          ,values);
        
        
          var
        
        
          getdate
        
        
          =
        
        
          datexml(
        
        
          "
        
        
          include/xmlgetp_c_c.asp
        
        
          "
        
        
          ,values);
          
           
           if
        
        
          (getdate)
        
        
          ...
        
        
          
            {
        
        
          if
        
        
          (getdate)
        
        
          ...
        
        
          
            {
            
             
             if
          
          
            (getdate
          
          
            !=
          
          
          
          
            "
          
          
            wrong
          
          
            "
          
          
          
          
            &&
          
          
            getdate
          
          
            !=
          
          
            "
          
          
            no
          
          
            "
          
          
            )
          
          
            ...
          
          
            
              {
          
          
            if
          
          
            (getdate
          
          
            !=
          
          
          
          
            "
          
          
            wrong
          
          
            "
          
          
          
          
            &&
          
          
            getdate
          
          
            !=
          
          
            "
          
          
            no
          
          
            "
          
          
            )
          
          
            ...
          
          
            
              {
              
               var
            
            
              objSelect
            
            
              =
            
            
              document.getElementById(SelectName);
            
            
              var
            
            
              objSelect
            
            
              =
            
            
              document.getElementById(SelectName);
              
               objSelect.options.length
            
            
              =
            
            
              1
            
            
              ;
              objSelect.options.length
            
            
              =
            
            
              1
            
            
              ;
              
               var
            
            
              datearray
            
            
              =
            
            
              getdate.split(
            
            
              "
            
            
              $
            
            
              "
            
            
              );
            
            
              var
            
            
              datearray
            
            
              =
            
            
              getdate.split(
            
            
              "
            
            
              $
            
            
              "
            
            
              );
              
               
               for
            
            
              (i
            
            
              =
            
            
              0
            
            
              ;i
            
            
              <
            
            
              datearray.length
            
            
              -
            
            
              1
            
            
              ;i
            
            
              ++
            
            
              )
            
            
              ...
            
            
              
                {
            
            
              for
            
            
              (i
            
            
              =
            
            
              0
            
            
              ;i
            
            
              <
            
            
              datearray.length
            
            
              -
            
            
              1
            
            
              ;i
            
            
              ++
            
            
              )
            
            
              ...
            
            
              
                {
                
                 var
              
              
                op
              
              
                =
              
              
                window.document.createElement(
              
              
                "
              
              
                option
              
              
                "
              
              
                );
              
              
                var
              
              
                op
              
              
                =
              
              
                window.document.createElement(
              
              
                "
              
              
                option
              
              
                "
              
              
                );
                
                 op.value
              
              
                =
              
              
                datearray[i].split(
              
              
                "
              
              
                |
              
              
                "
              
              
                )[
              
              
                0
              
              
                ];
                op.value
              
              
                =
              
              
                datearray[i].split(
              
              
                "
              
              
                |
              
              
                "
              
              
                )[
              
              
                0
              
              
                ];
                
                 op.innerHTML
              
              
                =
              
              
                unescape(datearray[i].split(
              
              
                "
              
              
                |
              
              
                "
              
              
                )[
              
              
                1
              
              
                ]);
                op.innerHTML
              
              
                =
              
              
                unescape(datearray[i].split(
              
              
                "
              
              
                |
              
              
                "
              
              
                )[
              
              
                1
              
              
                ]);
                
                 objSelect.appendChild(op);
                objSelect.appendChild(op);
                
                 }
                }
              
            
            
              
               
               if
            
            
              (selvalues
            
            
              !=
            
            
            
            
              ""
            
            
              )
            
            
              ...
            
            
              
                {
            
            
              if
            
            
              (selvalues
            
            
              !=
            
            
            
            
              ""
            
            
              )
            
            
              ...
            
            
              
                {
                
                 
                 for
              
              
                (i
              
              
                =
              
              
                0
              
              
                ;i
              
              
                <
              
              
                objSelect.options.length;i
              
              
                ++
              
              
                )
              
              
                ...
              
              
                
                  {
              
              
                for
              
              
                (i
              
              
                =
              
              
                0
              
              
                ;i
              
              
                <
              
              
                objSelect.options.length;i
              
              
                ++
              
              
                )
              
              
                ...
              
              
                
                  {
                  
                   
                   if
                
                
                  (objSelect.options[i].value
                
                
                  ==
                
                
                  selvalues)
                
                
                  ...
                
                
                  
                    {
                
                
                  if
                
                
                  (objSelect.options[i].value
                
                
                  ==
                
                
                  selvalues)
                
                
                  ...
                
                
                  
                    {
                    
                     objSelect.options[i].selected
                  
                  
                    =
                  
                  
                  
                  
                    true
                  
                  
                    ;
                    objSelect.options[i].selected
                  
                  
                    =
                  
                  
                  
                  
                    true
                  
                  
                    ;
                    
                     break
                  
                  
                    ;
                  
                  
                    break
                  
                  
                    ;
                    
                     }
                    }
                  
                
                
                  
                   }
                  }
                
              
              
                
                 }
                }
              
            
            
              
               }
              }
            
          
          
            
             }
            }
          
        
        
          
           }
          }
        
      
      
        
         
      
     
   
   读取数据库叶面 
  
  
    
       <
      
      
        !
      
      
        --
      
      
        #includefile
      
      
        =
      
      
        "
      
      
        dbconn.asp
      
      
        "
      
      
        -->
      
        <
      
      
        !
      
      
        --
      
      
        #includefile
      
      
        =
      
      
        "
      
      
        dbconn.asp
      
      
        "
      
      
        -->
      
      
        
         <
      
      
        %
      
      
        <
      
      
        %
        
         pid
      
      
        =
      
      
        request.querystring(
      
      
        "
      
      
        pid
      
      
        "
      
      
        )
        pid
      
      
        =
      
      
        request.querystring(
      
      
        "
      
      
        pid
      
      
        "
      
      
        )
        
         if
      
      
        pid
      
      
        <>
      
      
        ""
      
      
      
      
        then
      
      
        if
      
      
        pid
      
      
        <>
      
      
        ""
      
      
      
      
        then
      
      
        
         if
      
      
      
      
        isnumeric
      
      
        (pid)
      
      
        =
      
      
        false
      
      
      
      
        then
      
      
        if
      
      
      
      
        isnumeric
      
      
        (pid)
      
      
        =
      
      
        false
      
      
      
      
        then
      
      
        
         response.write
      
      
        "
      
      
        wrong
      
      
        "
        response.write
      
      
        "
      
      
        wrong
      
      
        "
      
      
        
         end
      
      
      
      
        if
      
      
        end
      
      
      
      
        if
      
      
        
         end
      
      
      
      
        if
      
      
        end
      
      
      
      
        if
      
      
        
         if
      
      
        pid
      
      
        =
      
      
        ""
      
      
      
      
        then
      
      
        if
      
      
        pid
      
      
        =
      
      
        ""
      
      
      
      
        then
      
      
        
         sql
      
      
        =
      
      
      
      
        "
      
      
        selectzipcode,zipnamefromZIPCODEINFOwhereparentzipisnull
      
      
        "
        sql
      
      
        =
      
      
      
      
        "
      
      
        selectzipcode,zipnamefromZIPCODEINFOwhereparentzipisnull
      
      
        "
      
      
        
         else
      
      
        else
      
      
        
         sql
      
      
        =
      
      
      
      
        "
      
      
        selectzipcode,zipnamefromzipcodeinfowhereparentzip='
      
      
        "
      
      
        &
      
      
        pid
      
      
        &
      
      
        "
      
      
        '
      
      
        "
        sql
      
      
        =
      
      
      
      
        "
      
      
        selectzipcode,zipnamefromzipcodeinfowhereparentzip='
      
      
        "
      
      
        &
      
      
        pid
      
      
        &
      
      
        "
      
      
        '
      
      
        "
      
      
        
         end
      
      
      
      
        if
      
      
        end
      
      
      
      
        if
      
      
        
         call
      
      
        dbopen
      
      
        call
      
      
        dbopen
        
         set
      
      
        rs
      
      
        =
      
      
        conn.execute(sql)
      
      
        set
      
      
        rs
      
      
        =
      
      
        conn.execute(sql)
        
         if
      
      
      
      
        not
      
      
        rs.eof
      
      
        then
      
      
        if
      
      
      
      
        not
      
      
        rs.eof
      
      
        then
      
      
        
         do
      
      
      
      
        while
      
      
      
      
        not
      
      
        rs.eof
      
      
        do
      
      
      
      
        while
      
      
      
      
        not
      
      
        rs.eof
        
         response.writers(
      
      
        "
      
      
        zipcode
      
      
        "
      
      
        )
      
      
        &
      
      
        "
      
      
        |
      
      
        "
      
      
        &
      
      
        escape(rs(
      
      
        "
      
      
        zipname
      
      
        "
      
      
        ))
      
      
        &
      
      
        "
      
      
        $
      
      
        "
        response.writers(
      
      
        "
      
      
        zipcode
      
      
        "
      
      
        )
      
      
        &
      
      
        "
      
      
        |
      
      
        "
      
      
        &
      
      
        escape(rs(
      
      
        "
      
      
        zipname
      
      
        "
      
      
        ))
      
      
        &
      
      
        "
      
      
        $
      
      
        "
      
      
        
         rs.movenext
        rs.movenext
        
         loop
      
      
        loop
      
      
        
         else
      
      
        else
      
      
        
         response.write
      
      
        "
      
      
        no
      
      
        "
        response.write
      
      
        "
      
      
        no
      
      
        "
      
      
        
         end
      
      
      
      
        if
      
      
        end
      
      
      
      
        if
      
      
        
         set
      
      
        rs
      
      
        =
      
      
        nothing
      
      
        set
      
      
        rs
      
      
        =
      
      
        nothing
      
      
        
         call
      
      
        dbclose
      
      
        call
      
      
        dbclose
        
         %
      
      
        >
        %
      
      
        >
      
     
   
  
    
      无刷新三级联动菜单从数据库获取数据(适用于firefox和ie)
    
  
 	
	
	
	
	
			
	
		
			
				
					更多文章、技术交流、商务合作、联系博主
					
						微信扫码或搜索:z360901061
					
					
					
						微信扫一扫加我为好友
						
							QQ号联系:  360901061
						
					 
				 
			 
		 
	 
	
		
			
				
					您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。
					
						【本文对您有帮助就好】元