• js中获取url参数


    function GridRowOnDblClick(strFile, pkValue, rowIndex) {   

           var myJSON = {

                value1: '',

                value2: '',

                load: function () {

                },

                serialize: function () {

                    var json = "";

                    for (var key in this) {

                        if (typeof this[key] != 'function') {

                            json += (json != "" ? "," : "") + key + ":'" + this[key] + "'";

                        }

                    }

                    json = '{' + json + '}';

                    return json;

                }

            }//end of myJSOON

          

          var obj = getUrlArgs();  //JS获取URL参数 

            if (typeof(myJSON) != 'undefined') {

                  myJSON.value1 = obj.CS;// URL参数

                  myJSON.value2 = pkValue;

           }

            $.ajax({

            type: "POST",

            contentType: "application/json",

            url: "/SlnWLPZ/KCWLPZ.aspx/GetCKWish",    

                  data:myJSON.serialize(),

            dataType: 'json',

            success: function (result) {

                var json = eval(result.d);

                if (json == "1") {

                  var r=rowIndex*1+1;

                  var grid = document.all.grdTest;  

                  var selectedRow = grid.rows[r];   

                  selectedRow.style.backgroundColor = '#76EE00';          

                }

                if (json == "0") {

                    alert('配置出错');

                }

                return false;

            } //success: function(result)

        }); //$.ajax

        return false;

    }

  • 相关阅读:
    廖雪峰python 摘录1
    python web 测试CGI脚本
    AttributeError: 'Athlete' object has no attribute 'top3'
    python类定义小问题
    def函数安装调用的疑惑
    print_lol函数调用
    实现键盘输入信息,按enter键调用摄像头自动拍照
    EditText不能输入表情
    使用videoview播放资源文件夹下的视频
    使用videoview连续自动播放网络视屏
  • 原文地址:https://www.cnblogs.com/nuaaydh/p/4313298.html
Copyright © 2020-2023  润新知