Web/Scripts/Authority/RoleEdit.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


$(document).ready(function () {


    //定义方法 获取url参数 name:参数名
    $.getUrlParam = function (name) {

        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");

        var r = window.location.search.substr(1).match(reg);

        if (r != null) return unescape(r[2]); return null;

    }


    var paramID = $.getUrlParam('id');
    var urlID = "";
    if (paramID != null) {
        $("#btnSave").hide();
        showInfo(paramID);
        urlID = "?id=" + paramID;
    }


    $("#btnSave").click(function () {

        var vName = $("#txtRoleName").val();
        if (vName == "") {
            $("#msgShow").html("<font color=\"#ff0000\">请输入角色名称!</font>");
            return;
        }
        else
            $("#msgShow").empty();

        var vRemark = $("#txtRemark").val();

        $.post("../../Authority/roleEdit.ashx" + urlID,
          {
              name: vName,
              remark: vRemark
          }, function (data, status) {

              strData = eval("(" + data + ")");

              if (strData.status == "1") {
                  //alert("Data: " + data + "\nStatus: " + status);
                  $("#txtRoleName").val("");
                  $("#txtRemark").val("");
                  $("#msgShow").html("<font color=\"#68a716\">" + strData.msg + "</font>");

              }
              else
                  $("#msgShow").html("<font color=\"#ff0000\">" + strData.msg + "</font>");

          });
    });
    //btnSave结束

    $("#btnSaveAndClose").click(function () {
后面还有 50 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。