쿠키 기록

2070 단어 IE

// 
if (document.all){ //ie
     window.attachEvent('onload',readCookie);
} else{ //ff
     window.addEventListener('load',readCookie,false);
}


// onclick 
function setCookie(name, value){//name key,key ,value 
		value = encodeURI(value);// 
		var date = new Date();
		date.setTime(date.getTime()-1);// 
		var broken_Cookie =document.cookie.split(";");
		if(broken_Cookie.length > 10) {
			var kuku = ""+broken_Cookie[0].split("=")[0]+"="+value+";expires="+date.toGMTString();+"";
			document.cookie =kuku;
		}
		var Cookie = ""+name+"="+value+"";
		document.cookie =Cookie;
	}
	// cookie 
	function readCookie(){
		var historyHereJob = document.getElementById("historyHereJob");
		var Cookie = document.cookie;
		var broken_Cookie =Cookie.split(";");
		for(var i = 0; i < broken_Cookie.length; i++) {
			var content =  broken_Cookie[i];
			var index = content.indexOf("hereJob");
			if(index == 0 || index == 1) {
				var li = document.createElement("li");
				var text = content.split("=")[1];
				text = decodeURI(text);
				var index = content.split("=")[0];
				li.innerHTML = "<span><a href='/HereB2B/app/job/jobshow/"+index.split('b')[1]+".htm' title='"+text+"'>"+text.substr(0,17)+"</a></span>";
				historyHereJob.appendChild(li);
			}			
		}
	}



alert 
hereDeploy118=%E4%B8%AD%E5%9B%BD%E5%AE%81%E6%B3%A2%E7%89%B9%E8%AE%B8%E7%BB%8F%E8%90%A5%E5%8A%A0%E7%9B%9F%E8%BF%9E%E9%94%81%E5%B1%951; hereDeploy273=%E4%B8%AD%E5%9B%BD%E5%AE%81%E6%B3%A2%E7%89%B9%E8%AE%B8%E7%BB%8F%E8%90%A5%E5%8A%A0%E7%9B%9F%E8%BF%9E%E9%94%81%E5%B1%9513; JSESSIONID=D2D43F021F23CC650AC51E68D55730C9


좋은 웹페이지 즐겨찾기