jqure获取gridview中的页面值

    一下代码是保存grid view checked 列中更改的值:其中样式CbStyle列中的值有的是在页面上,有的是绑定的,在取值时情况不同取值方式不同!!希望对大家有用

    $(document).ready(function() {
         $("#btn_savepofunc").bind("click",function(){
               var jq_postcode =$("#tx_postid").attr("value");
               var jq_postname =$("#tx_postname").attr("value");
               if (jq_postcode == undefined || jq_postcode.lenght <1)
               {
                 alert("职务代码不能为空!");
                 return;
               }
               if (jq_postname == undefined || jq_postname.lenght <1)
               {
                 alert("职务名称不能为空!");
                 return;
               }
               //var jq_postid=window.location.href.split("=")[1];
               var jq_postid =$("#hid_text").attr("value");
       if (jq_postid =="-1")
       {
         alert("请先保存职务信息!");
         return;
       }
               var post_runtype="12";
               var jq_funcid=0;
               var jq_taskworkid=0;
               var jq_typelist =0;
               var re_result=0;
               var jq_arrone="";
               var jq_arrtwo="";
               $("#Gv_TaskList input[type=checkbox]").each(function() {
                   if (this.checked ==true) {
                        post_runtype="12";
                        jq_funcid=$(this).parents("tr").find(".hid:eq(0)").html();
                        jq_taskworkid =$(this).parents("tr").find(".hiditem:eq(0)").html();
                        jq_typelist =$(this).parents("tr").find(".CbStyle:eq(0)").html();
                       
                        if (jq_typelist.indexOf("<SPAN",0) >=0)
                        {
                          jq_typelist =$(this).parents("tr").find(".CbStyle:eq(0) span").html();
                        }
                        jq_arrone =jq_typelist.split(" :")[0];
                        jq_arrtwo =jq_typelist.split(":")[1];
                        if (jq_arrone ==undefined)
                        {
                         jq_arrone="";
                        }
                        if (jq_arrtwo ==undefined)
                        {
                        jq_arrtwo="";
                        }
                     }
                     else
                     {
                        post_runtype="13";
                        jq_funcid=$(this).parents("tr").find(".hid:eq(0)").html();
                        jq_taskworkid =$(this).parents("tr").find(".hiditem:eq(0)").html();
                        jq_typelist =$(this).parents("tr").find(".CbStyle:eq(0)").html();
                     }
                     jqure_save.save_post(post_runtype,jq_funcid,jq_taskworkid,jq_postid,jq_arrtwo,jq_arrone,function(response) {
                       if (response.error != null) {
                          window.alert(response.error.Message);
                        }
                       else
                       {
                        var result = response.value;
                        if (result == "成功")
                        {
                            re_result=0;
                        }
                        else
                         {
                            re_result=-1;
                         }
                       }
                     });
               });
               if (re_result ==-1)
               {
                 alert("保存时有错误!");
               }
               else
               {
                alert("修改成功!");
               }
          });
        });

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值