javascript获取cookie

admin4年前前端技术1126
//获取cookie
function getcooki(name) {
var name=name+"=";
var mine=document.cookie.split(';');
var c=mine[0].trim();
var last=c.substring(name.length,c.length);
return last 
}


相关文章

JQuery 两种方法解决刚创建的元素遍历不到的问题

刚创建的元素,使用jQuery的each方法来遍历,有时候会不起作用。原因不用多说,经常使用javascript的人应该都会知道,解决方案大致有2种:1、刚创建完元素的时候,就立刻使用each方法$(...

分享与定时自动跳转

<!DOCTYPE html> <html> <head> <meta charset="utf-8">...

让TD 与div自动换行的css方法

word-wrap: break-word;  word-break: break-all; white-space: normal;...

原生javascrip 复制功能

兼容chrome FIrfox IE 下载地址000.zip代码如下:<!DOCTYPE html> <html> <head> &nbs...

jquery默认设置第一个类的css或者属性

var me=$("#cima>input");me.eq(0).css...

Navigate down the menu through jquery development

The core knowledge is to use jquery's hover method to achieve, The animation effe...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。