javascript²Ù×÷cookie
//set cookie
function setcookie(name,value){
var Days = 30;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getcookie(name){
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null){
return unescape(arr[2]);
}else{
return "";
}
}
function delcookie(name){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
//delcookie("GD-cms");
if (document.cookie != "") {
setcookie("GD-cms", "gae-django-cms");
}
alert(getcookie("GD-cms"));
Ïà¹ØÎĵµ£º
ÔÚb/s¿ª·¢Öо³£Óõ½µÄjavaScript¼¼Êõ
Ò»¡¢ÑéÖ¤Àà
1¡¢Êý×ÖÑéÖ¤ÄÚ
1.1 ÕûÊý
1.2 ´óÓÚ0µÄÕûÊý £¨ÓÃÓÚ´«À´µÄIDµÄÑéÖ¤)
1.3 ¸ºÕûÊýµÄÑéÖ¤
1.4 ÕûÊý²»ÄÜ´óÓÚiMax
1.5 ÕûÊý²»ÄÜСÓÚiMin
2¡¢Ê±¼äÀà
2.1 ¶Ìʱ¼ä£¬ÐÎÈç (13:04:06)
2.2 ¶ÌÈÕÆÚ£¬ÐÎÈç (2003-12-05)
2.3 ³¤Ê±¼ä£¬ÐÎÈç (2003-12-05 13:04:06)
2. ......
¿Í»§¶Ëä¯ÀÀÆ÷²»Ö§³Öµ±Ç°JavaScript½Å±¾´æÔÚÈçÏÂÈýÖÖ¿ÉÄÜ£º
¿Í»§¶Ëä¯ÀÀÆ÷²»Ö§³ÖÈκÎJavaScript½Å±¾£»
¿Í»§¶Ëä¯ÀÀÆ÷Ö§³ÖµÄJavaScript½Å±¾°æ±¾Óë¸Ã½Å±¾´úÂëʹÓõİ汾ËùÖ§³ÖµÄ¶ÔÏó¡¢ÊôÐÔ»ò·½·¨²»Í¬£»
¿Í»§¶ËΪÁË°²È«Æð¼û£¬ÒѾ½«ä¯ÀÀÆ÷¶ÔJavaScript½Å±¾µÄÖ§³ÖÉèÖÃΪ½ûÖ¹¡£
ÒÔÉÏÈýÖÖÇé¿ö×ܽáÆðÀ´£¬¾ÍÊÇä¯ÀÀÆ÷¶ ......
JavaScript ==> PHP£º
·½·¨Ò»: ÏÈÓÃPHPÉú³Éjs´úÂ룬Ȼºóͨ¹ýä¯ÀÀÆ÷µÄ×Ô¶¯Ë¢Ð£¬½«javascript±äÁ¿´«µÝµ½PHP½Å±¾ÖС£
×¢Ò⣺ÔÚʵ¼ÊÓ¦ÓÃÖÐÒª·ÀÖ¹Óû§ÔÚµØÖ·À¸ÄÚ¸ü¸Ä´«µÝµÄ±äÁ¿Öµ¡£
<?php
if($qq) echo $qq.'<br>';
else echo "<scrip ......
¶ÔÓÚ³õѧÕߣ¬Ò²Ðдó¼Ò»áÈÏΪJava°üº¬JavaScript£¬È»¶øÕâÖÖ´Ó×ÖÃæÒâ˼µÄÀí½âÊÇ´íÎóµÄ£¬ÏÂÃæС±àdz̸һÏÂJavaScriptÓëjavaµÄÇø±ð¡£
1. »ùÓÚ¶ÔÏóºÍÃæÏò¶ÔÏó
JavaÊÇÒ»ÖÖÕæÕýµÄÃæÏò¶ÔÏóµÄÓïÑÔ£¬¼´Ê¹ÊÇ¿ª·¢¼òµ¥µÄ³ÌÐò£¬±ØÐëÉè¼Æ¶ÔÏó¡£
JavaScriptÊÇÖֽű¾ÓïÑÔ£¬Ëü¿ÉÒÔÓÃÀ´ÖÆ×÷ÓëÍøÂçÎ޹صģ¬ÓëÓû§½»»¥×÷Óõĸ´ÔÓÈí¼þ¡£ ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......