Javascript ÉèÖÃtextareaÊäÈë¿òµÄ×î´óÖµ
<html>
<head>
<title>²âÊÔÊäÈë×Ö·û</title>
<script language=javascript>
String.prototype.lenB =function(){
return this.replace(/[^\x00-\xff]/g,"**").length;
}
function a(){
var str=document.getElementById("content").value;
if(str.length <= 180){
abc.innerText="ÄúÒѾÊäÈë"+str.length+"/180¸ö×Ö£¨Ã¿Ìõ¶ÌÐÅ×î¶à70¸ö×Ö£¬³¬¹ý·Ö¶àÌõ·¢ËÍ£©";
}else{
abc.innerText="×î¶àÖ»ÔÊÐíÊäÈë180¸ö×Ö¡£"
}
}
</script>
</head>
<body>
<textarea onpropertychange="if(value.length>80) value=value.substr(0,80)" id="content" onkeyup="a();"></textarea>
<input maxlength="5"/>
<p id="abc"></p>
</body>
</h tml>
Ïà¹ØÎĵµ£º
½â¾ö˼·
Õâ¸öЧ¹û²¢²»Ëã³£¼û£¬Í¨³£ÓÃÓÚÓÎÏ·»ò¸öÈËÕ¾µãÖС£ÒòΪÍÏÒ·ÊÇ¿¿Êó±êÀ´²Ù×÷µÄ£¬ËùÒÔ¶ÔÊó±êµÄλÖõIJ¶»ñÊÇÎÊÌâµÄÖØµã£¬È»ºó²ÅÊǸù¾ÝÊó±êµÄλÖÃÉèÖòãµÄλÖá£
¾ßÌå²½Ö裺
1.ÔÚ¶ÔÏó(²ã)Éϰ´ÏÂÊó±êʱ£¬ÏȲ¶»ñµ½ÐèÒªÍÏÒ·µÄ¶ÔÏó£¬È»ºó»ñÈ¡»òÉèÖøöÔÏóµÄÏà¹ØÊôÐÔ¡£
obj=ev ......
Node.jsÊÇÒ»Ì×ÓÃÀ´±àд¸ßÐÔÄÜÍøÂç·þÎñÆ÷µÄJavaScript¹¤¾ß°ü£¬Ò»ÏµÁеı仯ÓÉ´Ë¿ªÊ¼¡£
Ò²ÐíÄ㻹²»ÖªµÀ£¬JavaScriptÏÖÔÚÒѾ³ÉÁËÒ»Ãſɱàд³öЧÂʼ«¸ßµÄ¡¢¿ÉÓÃÓÚ¿ª·¢²úÆ·¼¶web·þÎñÆ÷µÄ³öÉ«ÓïÑÔ¡£Æð³õÎÒÒ²²»ÏàÐÅ£¬µ«2009 ÄêÆô¶¯µÄÁ½¸öÏîÄ¿ÈÃÕâ³ÉΪ¿ÉÄÜ£ºCommonJSºÍNode¡£
¾¡¹ÜJavaScriptÒѾ³öÏֺܳ¤Ò»¶Îʱ¼äÁË£¬ÔËÓÃÒ²ºÜ¹ã· ......
Javascript code prettifier
Javascript ´úÂëÃÀÈÝʦ
°²×°Ê¹ÓÃ
ÏÂÔØ Îļþ
ÔÚÄãµÄÎļþÖаüº¬Õâ¶ùµÄ½Å±¾ºÍÑùʽ±í(ÄãÒª±£Ö¤Õâ¶ùµÄ css ºÍ js Îļþ°´ÔÚÄãµÄ·þÎñÆ÷ÉÏ, ²¢ÇÒµ÷ÕûÔÚ script ºÍ link±êÇ©ÖеÄ·¾¶)
<link href="prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" sr ......
javascriptÖÐwindow¶ÔÏóµÄ·½·¨ºÍÊôÐÔ×ÊÁÏ
ÒýÓãºhttp://www.cnblogs.com/Athrun/archive/2008/04/16/1156291.html
Window¶ÔÏóÊǿͻ§¶Ëjavascript×î¸ß²ã¶ÔÏóÖ®Ò»£¬Ö»Òª´ò¿ªä¯ÀÀÆ÷´°¿Ú£¬²»¹Ü¸Ã´°¿ÚÖÐÊÇ·ñÓдò¿ªµÄÍøÒ³£¬µ±Óöµ½BODY¡¢FRAMESET»òFRAMEÔªËØÊ±£¬¶¼»á×Ô¶¯½¨Á¢window¶ÔÏóµÄʵÀý¡£ÁíÍ⣬¸Ã¶ÔÏóµÄʵÀýÒ²¿ÉÓÉwi ......
ÔÚ JS(JavaScript) ²Ù×÷cookies±È½Ï¸´ÔÓ£¬ÔÚ ASP ÀïÃæÎÒÃÇÖ»ÐèÒªÖªµÀ cookie µÄÃû³Æ¡¢cookie µÄÖµ¾ÍÐÐÁË£¬¶ø JS ÀïÃæ£¬ÎÒÃÇÃæ¶ÔµÄÊÇ cookie µÄ×Ö·û´®£¬Äã×Ô¼º±àдÕâ¸ö×Ö·û´®Ð´Èë¿Í»§¶Ë£¬È»ºó×Ô¼º½âÎöÕâ¸ö×Ö·û´®¡£
¡¡¡¡Ò»¡¢´Óд cookie ˵Æð¡£
var the_date = new Date("December 31, 2020");
var expiresDate ......