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

ͨ¹ýjavascript»ñµÃurl²ÎÊý

Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£ 
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs»ñÈ¡url²ÎÊýÄØ£¿
ÔĶÁ ±à¼­ ÔËÐÐ ¸´ÖÆ  ±£´æ
<!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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript">
function GetUrlParms()
{
var args=new Object();
var query=location.search.substring(1);//»ñÈ¡²éѯ´®
var pairs=query.split("&");//ÔÚ¶ººÅ´¦¶Ï¿ª
for(var i=0;i<pairs.length;i++)
{
var pos=pairs[i].indexOf('=');//²éÕÒname=value
if(pos==-1) continue;//Èç¹ûûÓÐÕÒµ½¾ÍÌø¹ý
var argname=pairs[i].substring(0,pos);//ÌáÈ¡name
var value=pairs[i].substring(pos+1);//ÌáÈ¡value
args[argname]=unescape(value);//´æΪÊôÐÔ
}
return args;
}
//ʹÓ÷½·¨£º
var args = new Object();
args = GetUrlParms();
//Èç¹ûÒª²éÕÒ²ÎÊýArticleID:
var articleID = args["ArticleID"];
alert(articleID);
//Èç¹ûÒª²éÕÒ²ÎÊýTypeID
var typeID = args["TypeID"];
alert(typeID);
</script>
</head>
<body>

</body>
</html>


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

[·­Òë]High Performance JavaScript(003)

Dynamic Script Elements  ¶¯Ì¬½Å±¾ÔªËØ
    The Document Object Model (DOM) allows you to dynamically create almost any part of an HTML document using JavaScript. At its root, the <script> element isn't any different than any other element on a page: references can be retrie ......

[·­Òë]High Performance JavaScript(004)

XMLHttpRequest Script Injection  XHR½Å±¾×¢Èë
    Another approach to nonblocking scripts is to retrieve the JavaScript code using an XMLHttpRequest (XHR) object and then inject the script into the page. This technique involves creating an XHR object, downloading the JavaScript f ......

¹ØÓÚjavascriptÄ£¿é¼ÓÔصÄ˼Ë÷2

¾­¼¸Ìì˼¿¼£¬Ïëµ½Ò»¸ö½Ð¡°ÎļþÓëÄ£¿é¡±µÄÎÊÌâ¡£ÎÒÃǵÄÄ£¿é¿Ï¶¨Ð´ÔÚÒ»¸öJSÎļþÖУ¬ÕâЩģ¿éÓÖ¿ÉÒÔ·ÖΪºËÐÄÄ£¿éÓëÍâΧģ¿é¡£ºËÐÄÄ£¿éµ±È»Ð´ÔÚÖ÷ÎļþÖУ¬ËüÓ¦¸Ã°üº¬×îÖØÒªµÄÂß¼­£¬¼ÓÔØÆ÷£¬Áжӣ¬ÃüÃû¿Õ¼ä¹¹ÔìÆ÷µÈµÈ¡£µ«Èç¹ûÒ»¸öÎļþÖ»´æÔÚÒ»¸öÄ£¿éÕâҲ̫ÀË·ÑÁË£¬¶øÇһᵼÖÂÇëÇ󷨹ý¶à£¬Òò´Ë³öÏÖ¶à¸öÄ£¿é¡°¹²Éú¡±ÓÚÒ»¸öÎļþµÄÇé ......

Javascriptµ¯³ö¶Ô»°¿ò3ÖÖ·½Ê½

<!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=gb2312" />
 &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ