从cookie中取值:

var userid = $.cookie("remoteuserid");
例子:

function delUser() {

    var table = $('#grid-user-list');
    var chkBoxes = table.find('input.invechk:checked');
    if (chkBoxes.length == 0) {
        showMsgPane('请选择需要删除的用户。', 'prompt');
        return false;
    }
    var callback = function() {
    var userid = $.cookie("remoteuserid");
    var id = new Array(); 
    $(chkBoxes).each(function() {
    if(userid == $(this).val()){
    showMsgPane('管理员不能删除自己');
    return false;
    }
    else{
    id.push($(this).val());
    }    
    });
   
    jQuery.ajaxSettings.traditional = true;
    var url=adminPluginPath + "/basic/user/delete.json";
    $.post(url,{id:id},function( rtn ) {
    refresh();
       });
    };
    showMsgPane('该用户删除后,所有信息将被删除。您确定要删除吗?','confirm', callback);
}

从cookie中取值$.cookie()的更多相关文章

  1. struts2 与 OGNL 表达式,jsp中 利用ognl 在valuestack中取值

    在Struts2中,一个请求在终于到达Action的方法之前,Action对象本身会被压入ValueStack(实际上就是放到ValueStack的CompoundRoot中),所以Action对象是 ...

  2. 在properties.xml中定义变量,在application.xml中取值问题

    如果为application.xml中的变量赋默认值,同时又在properties.xml中变量赋值,而加载后是取不到properties.xml中的值的问题. 解决这个问题需要加上黑体部分配置: & ...

  3. @Value在Controller中取值

    一.使用 @Value("${name}")注解可以获取自定义的properties文件中的name值 二.配置 如果只是在applicationcontext.xml中配置,那么 ...

  4. go语言怎么从(json后的)多层map中取值

    // 一个PHP中的多层关联数组,即Go中的多层map,如何从json字符串中解析,然后取到map中的某个具体的值. // 数据结构如下: cityInfo := "{ "stat ...

  5. EL表达式从request和session中取值

    在Action中保存登录的基本信息:request.getSession().setAttribute("adminid", str); 在JSP页面中:${sessionScop ...

  6. java从c struct传来的字节数组中取值

    public int getInt(byte[] array,int index) { return (array[index]  & 0xff)  | (array[index + 1] & ...

  7. jsonpath 字典中取值

    jsonpath 第三方模块 def getsign(): url="http://api.nnzhp.cn/api/user/login" data = {"usern ...

  8. python 从Excel中取值

    import openpyxl from openpyxl import load_workbook def open_file(file_path): workbook = load_workboo ...

  9. Flutter-TextField初始化值和選中取值

    import 'package:flutter/material.dart'; class PersonalCenterInformationScreen extends StatefulWidget ...

随机推荐

  1. 认识hammer.js

    hammerjs是什么 hammerjs是一个短小精悍的库,他可以让我们轻松的实现移动端上的手势. hammerjs的两大优势如下: 为移动端网页添加相关手势. 去除移动端上的点击事件的300ms延迟 ...

  2. OpenLTE安装教程

    安装需求: USB3 interface Modern multicore CPU (Intel Core i5, Core i7 or equivalent with SSE4.1 SSE4.2 a ...

  3. .net下所有DLL(API)查询,转换C#代码

    地址: http://www.pinvoke.net/default.aspx/coredll.SetDevicePower 实例: SetDevicePower (coredll)   coredl ...

  4. [转]Java IDE 之 IntelliJ IDEA 2017

    参考链接1:http://blog.csdn.net/u012364631/article/details/47682011 IDEA Community(社区版) 使用Maven创建Web工程 并部 ...

  5. mysql-9索引

    mysql索引的建立对于mysql的高效运行是很重要的,索引可以大大提高mysql的检索速度. 索引分为单列索引和组合索引. 单列索引,即一个索引只包含单个列,一个表可以有多个单列索引,但这不是组合索 ...

  6. CentOS 添加新硬件硬盘,扩展空间而无需重启虚拟机

    运行如下命令,通过重新扫描 SCSI (注:Small Computer System Interface 小型计算机系统接口)总线并添加 SCSI 设备,系统就可以扩展操作系统的物理卷磁盘空间,而且 ...

  7. python命令行中import caffe报错的解决方案

    1.ImportError: No module named skimage.io >>> import caffe Traceback (most recent call last ...

  8. ModelAttribute注解使用与spring重定向传参

    @ModelAttribute可以用于修饰controller里的方法和参数,将被修饰的对象的值绑定到指定名称的属性里.当修饰方法时,方法返回的值会在该controller里每个访问处理前绑定一次.修 ...

  9. tomcat下载安装和配置

    Tomcat服务器 1.Web开发中的常见概念 (1)B/S系统和C/S系统 Brower/Server:浏览器 服务器 系统 ----- 网站 Client/Server:客户端 服务器 系统 -- ...

  10. 如何使用C#程序给PDF文件添加编辑域

    PDF文档通常是不能编辑的,但有些时候需要在PDF文档中填写日期或签名之类,就需要在PDF有能编辑的文本域,本文介绍怎样用C#来实现这一功能. 环境 工具:VS2015 语言:C# 操作PDF类库:i ...