zoukankan      html  css  js  c++  java
  • Jquery 服务器回调为select填值

    看了jquery库真不错, 蛮好用 在服务器回调方面操作简单 

    <script src="http://www.cnblogs.com/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <script src="http://www.cnblogs.com/js/jquery.js" type="text/javascript"></script>
    <script src="http://www.cnblogs.com/js/jQuery.FillOptions.js" type="text/javascript"></script>
    <script src="http://www.cnblogs.com/js/jQuery.CascadingSelect.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function(){

       
         $("#select").FillOptions("http://www.cnblogs.com/handler/Handler.ashx?type=xml",{datatype:"xml",textfield:"InfoTypeName",valuefiled:"InfoTypeID",keepold:"true",selected:"0"});
         $("#select").AddOption("选择省份","-1",true,0);
     
         $("#select").CascadingSelect(
                $("#select2"),
                      "http://www.cnblogs.com/handler/Handler.ashx?type=xml",
                {datatype:"xml",textfield:"InfoTypeName",valuefiled:"InfoTypeID",parameter:"p"},
                function(){
                           $("#select2").AddOption("选择城市","-1",true,0);
                }
        );
       
          $("#select2").CascadingSelect(
                $("#select3"),
                      "http://www.cnblogs.com/handler/Handler.ashx?type=xml",
                {datatype:"xml",textfield:"InfoTypeName",valuefiled:"InfoTypeID",parameter:"p"},
                function(){
                           $("#select3").AddOption("选择网点","-1",true,0);
                }
        );
       
         $("#select3").change(function(){
                    $.ajax({
                        "type": "get",
                         "url":"http://www.cnblogs.com/handler/Handler2.ashx?typeid="+$("#select3 option[@selected]").val(),
                         "success": function(data) {
                              $("#showinfo").html(data);
                            },
                            "error": function(){
                           $("#showinfo").html(data);
                          }

                        });
         });
       
        });
     
    </script>

  • 相关阅读:
    linux 实现一列数据的求和、累积求和、及1/2求和
    linux系统中如何删除某些文件或者某一类以外的所有文件
    linux系统中查看系统内核、发行版本信息
    linux系统中如何将当前目录下的文件从大到小排序和从小到大排序
    c语言中float关键字和double关键字的区别
    linux 系统如何给软件设置环境变量
    使用detectRUNS包进行ROH检测,计算近交系数实践
    诸城模拟赛 dvd的逆序对
    codevs1316 文化之旅
    codevs2800 送外卖
  • 原文地址:https://www.cnblogs.com/zyosingan/p/1216178.html
Copyright © 2011-2022 走看看