欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

asp.net三級聯(lián)動(jquery+json)

liandong.aspx:
------------------------------------------

為內(nèi)丘等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及內(nèi)丘網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都網(wǎng)站設(shè)計、網(wǎng)站制作、內(nèi)丘網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠(yuǎn)!

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="liandong.aspx.cs" Inherits="WebApplication1.liandong" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>無標(biāo)題頁</title>

    <script src="script/jquery-1.6.2.js" type="text/javascript"></script>
        <script language="javascript" type="text/javascript">
            $(function() {
                $("#DropDownList1").change(function() {
                    var defaultValue = "<option value='-1'>--請選擇--</option>";
                    $("#DropDownList2").html(defaultValue);
                    $("#DropDownList3").html(defaultValue);
                    showMsg("#DropDownList1", "#DropDownList2");
                })

                $("#DropDownList2").change(function() {
                    var defaultValue = "<option value='-1'>--請選擇--</option>";
                    $("#DropDownList3").html(defaultValue);
                    showMsg("#DropDownList2", "#DropDownList3");
                })

            })

            function showMsg(sender, receiver) {
                var d1 = $(sender).val();
                $.ajax({
                    type: 'get',
                    dataType: "json",
                    url: 'liandong.ashx',
                    data: 'pid=' + d1,
                    success: function(data) {
                        $.each(data, function(i, o) {
                            var opts = "<option value='" + o.id + "'>" + o.name + "</option>";
                            $(receiver).append(opts);
                        })
                    }
                })
            }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem Value="-1">--請選擇--</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList ID="DropDownList2" runat="server">
            <asp:ListItem Value="-1">--請選擇--</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList ID="DropDownList3" runat="server">
            <asp:ListItem Value="-1">--請選擇--</asp:ListItem>
        </asp:DropDownList>
    
    </div>
    </form>
</body>
</html>

liandong.aspx.cs
-------------------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebApplication1
{
    public partial class liandong : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             if(!IsPostBack)
            {
                string sql = "select * from t_ld where pid=0";
                DataTable dt  = DBhelper.query(sql);
                foreach (DataRow dr in dt.Rows)
                {
                    ListItem li = new ListItem(dr["name"].ToString(), dr["id"].ToString());
                    this.DropDownList1.Items.Add(li);
                }
            }
        }
    }
}

liandong.ashx.cs

using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace WebApplication1
{
    /// <summary>
    /// $codebehindclassname$ 的摘要說明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class liandong1 : IHttpHandler
    {

        public void Proce***equest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            if(!string.IsNullOrEmpty(context.Request.QueryString["pid"]))
            {
                int pid = Convert.ToInt32(context.Request.QueryString["pid"]);
                string sql = "select * from t_ld where pid=" + pid;
                DataTable dt = DBhelper.query(sql);
                string json_str = "";
                json_str += "[";
                foreach (DataRow dr in dt.Rows)
                {
                    json_str += "{\"id\"";
                    json_str += ":";
                    json_str += "\"" + dr["id"].ToString() + "\"";
                    json_str += ",";
                    json_str += "\"name\"";
                    json_str += ":";
                    json_str += "\"" + dr["name"].ToString() + "\"";
                    json_str += "}";
                    json_str += ",";
                }
                json_str = json_str.Substring(0, json_str.Length - 1);
                json_str += "]";
                context.Response.Write(json_str);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

網(wǎng)頁標(biāo)題:asp.net三級聯(lián)動(jquery+json)
文章地址:http://chinadenli.net/article40/gpcoeo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站設(shè)計公司、響應(yīng)式網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)
国产国产精品精品在线| 五月天丁香婷婷一区二区| 又色又爽又黄的三级视频| 欧美一区二区三区不卡高清视| 99精品国产一区二区青青| 熟妇久久人妻中文字幕| 亚洲中文字幕高清乱码毛片| 久久中文字人妻熟女小妇| 91亚洲国产成人久久精品麻豆| 97人妻精品一区二区三区免| 爱在午夜降临前在线观看| 男人和女人干逼的视频| 老司机精品线观看86| 亚洲国产四季欧美一区| 亚洲国产香蕉视频在线观看| 国内精品一区二区欧美| 日韩偷拍精品一区二区三区 | 午夜激情视频一区二区| 亚洲少妇人妻一区二区| 欧美午夜一级特黄大片| 丁香七月啪啪激情综合| 亚洲成人精品免费在线观看| 中文字幕无线码一区欧美| 亚洲中文字幕亲近伦片| 草草视频精品在线观看| 日本不卡在线视频你懂的| 国产超薄黑色肉色丝袜| 不卡免费成人日韩精品| 欧美国产日本免费不卡| 91后入中出内射在线| 国产欧美日韩在线一区二区| 日本高清加勒比免费在线| 亚洲午夜精品视频在线| 麻豆精品在线一区二区三区| 久久精品国产亚洲av麻豆| 免费一级欧美大片免费看| 国产又粗又猛又长又黄视频| 黄色片国产一区二区三区| 欧美日韩在线观看自拍| 亚洲中文字幕乱码亚洲| 日本欧美在线一区二区三区|