Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÖÐµÄ escape,encodeURI,encodeURIComponent


js¶ÔÎÄ×Ö½øÐбàÂëÉæ¼°3¸öº¯Êý£ºescape,encodeURI,encodeURIComponent£¬ÏàÓ¦3¸ö½âÂ뺯Êý£ºunescape,decodeURI,decodeURIComponent
1¡¢   ´«µÝ²ÎÊýʱÐèҪʹÓÃencodeURIComponent£¬ÕâÑù×éºÏµÄurl²Å²»»á±»#µÈÌØÊâ×Ö·û½Ø¶Ï¡£                            
ÀýÈ磺<script language="javascript">document.write('<a href="http://passport.baidu.com/?logout&aid=7&u='+encodeURIComponent("http://cang.baidu.com/bruce42")+'">Í˳ö</a>');</script>
2¡¢   ½øÐÐurlÌøתʱ¿ÉÒÔÕûÌåʹÓÃencodeURI
ÀýÈ磺Location.href=encodeURI("http://cang.baidu.com/do/s?word=°Ù¶È&ct=21");
3¡¢   jsʹÓÃÊý¾Ýʱ¿ÉÒÔʹÓÃescape
[Huoho.Com±à¼­]
ÀýÈ磺ËѲØÖÐhistory¼Í¼¡£
4¡¢   escape¶Ô0-255ÒÔÍâµÄunicodeÖµ½øÐбàÂëʱÊä³ö%u****¸ñʽ£¬ÆäËüÇé¿öÏÂescape£¬encodeURI£¬encodeURIComponent±àÂë½á¹ûÏàͬ¡£
×î¶àʹÓõÄӦΪencodeURIComponent£¬ËüÊǽ«ÖÐÎÄ¡¢º«ÎĵÈÌØÊâ×Ö·ûת»»³Éutf-8¸ñʽµÄurl±àÂ룬ËùÒÔÈç¹û¸øºǫ́´«µÝ²ÎÊýÐèҪʹÓÃencodeURIComponentʱÐèÒªºǫ́½âÂë¶Ôutf-8Ö§³Ö£¨formÖеıàÂ뷽ʽºÍµ±Ç°Ò³Ãæ±àÂ뷽ʽÏàͬ£©
escape²»±àÂë×Ö·ûÓÐ69¸ö£º*£¬+£¬-£¬.£¬/£¬@£¬_£¬0-9£¬a-z£¬A-Z
encodeURI²»±àÂë×Ö·ûÓÐ82¸ö£º!£¬#£¬$£¬&£¬'£¬(£¬)£¬*£¬+£¬,£¬-£¬.£¬/£¬:£¬;£¬=£¬?£¬@£¬_£¬~£¬0-9£¬a-z£¬A-Z
encodeURIComponent²»±àÂë×Ö·ûÓÐ71¸ö£º!£¬ '£¬(£¬)£¬*£¬-£¬.£¬_£¬~£¬0-9£¬a-z£¬A-Z


Ïà¹ØÎĵµ£º

javascript ¿çä¯ÀÀÆ÷µÄʼþϵͳ3

Õⲿ·Ö˵һÏÂ×î½ü·Ç³£Á÷ÐеÄʼþ´úÀí¡£Ê¼þ´úÀíµÄʵÏÖ¼òµ¥À´Ëµ£¬ÊÇ°Ñʼþ°ó¶¨µ½Ä¿±êÔªËصÄ×æÏÈÔªËØÉÏ£¬È»ºóͨ¹ýðÅÝ»ò²¶»ñµÃµ½Ê¼þÔ´£¬È»ºóÔÙÅж¨Ê¼þÔ´ÊÇ·ñµÈÓÚÄ¿±êÔªËØÔÙÖ´Ðлص÷º¯Êý¡£ÓÉÓÚ¶ÔÄ¿±êÔªËصÄÅж¨ÓÐʱ·Ç³£Ä£ºý£¬Òò´Ëͨ¹ýÅж¨¼´¿Éµ÷Óûص÷º¯Êý£¬ÕâÑù£¬ÎÒÃǾʹﵽһ¸ö¼àÌýÆ÷ΪÐí¶àʼþÔ´·þÎñµÄÄ¿µÄ¡£¶ÔÓÚÐÔÄÜÒ»Ïò ......

javascriptʵÏÖkey value¶ÔÏó

JavaScriptµÄʵÏÖµÄMap£¬ÓÃ×Åͦ·½±ãµÄ£¬²»ÖªµÀÐÔÄÜÔõôÑù¡£
×Ô¼ºÓÃÖ»Óв»³¬¹ý10¸öÔªËØ£¬ËùÒÔÐÔÄÜÎÞËùνÁË¡£
/********************jsmap.js**************************/
/////// map Àà
function classMap() {
  this.map = new Array();
 
  var struct = function(key,
value){
  & ......

Javascript´íÎó´úÂë½âÊÍ´óÈ«

JScript ÔËÐÐʱ´íÎó
¡¡¡¡JScript ÔËÐÐʱ´íÎóÊÇÖ¸µ± JScript ½Å±¾ÊÔͼִÐÐÒ»¸öϵͳ²»ÄÜÔËÐеĶ¯×÷ʱµ¼ÖµĴíÎó¡£µ±ÕýÔÚÔËÐнű¾¡¢¼ÆËã±äÁ¿±í´ïʽ¡¢»òÕßÕýÔÚ¶¯Ì¬·ÖÅäÄÚ´æʱ³öÏÖ JScript ÔËÐÐʱ´íÎóʱ¡£
´íÎóºÅ ÃèÊö
5029 Êý×鳤¶È±ØÐëΪһÓÐÏÞÕýÕûÊý
5030 ±ØÐ븳¸øÊý×鳤¶ÈÒ»¸öÓÐÏÞÕýÊý
5028 ÐèÒª Array »ò arguments ......

ÓÃjavaScriptÖÆ×÷ÍøÒ³ÖÐÏÔʾÁбí

µÚÒ»ÖÖ:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ÎÞ±êÌâÎ ......

TEXTAREA ×Ö½ÚÏÞÖÆ(javascript£¬struts µÄÒ³Ãæ±êÇ©)

//Textarea maxlength
//flag:text¿òÃû×Ö£¬num:ÏÞÖƵÄ×Ö½ÚÊý
  function maxLen(flag,num){
  if(document.getElementById('lastMessage').value=="0" || document.getElementById('lastMessage').value==flag){
    var i=document.getElementById(flag).value.replace(/[\u0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ