javascript»ñµÃurl²ÎÊý
Ò»¡¢
<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();
//Èç¹ûÒª²éÕÒ²ÎÊýid:
//var ID = args["id"];
//alert(ID);
</script>
¶þ¡¢
<script type="text/javascript">
<!--
var url = "http://www.baidu.com/?age=25&k=1&site=asp&abc=123;"
//javascript»ñȡָ¶¨²ÎÊý¼°Æä¶ÔÓ¦µÄÖµ
function getParameter(paraStr, url)
{
var result = "";
//»ñÈ¡URLÖÐÈ«²¿²ÎÊýÁбíÊý¾Ý
var str = "&" + url.split("?")[1];
var paraName = paraStr + "=";
//ÅжÏÒª»ñÈ¡µÄ²ÎÊýÊÇ·ñ´æÔÚ
if(str.indexOf("&"+paraName)!=-1)
{
&nb
Ïà¹ØÎĵµ£º
0. ǰÑÔ
ËùνIEµØÖ·À¸±í´ïʽ£¬¾ÍÊÇÔÚIEµÄµØÖ·À¸ÖÐÊäÈë javascript:<´úÂë>£¬Ö´ÐÐijЩ¹¦ÄÜ£¬À´¶¯Ì¬¸Ä±äÔÓÐÒ³ÃæµÄ²ÎÊýÒԴﵽijЩĿµÄ£¬ÀýÈ翪·Å±»½ûÖ¹µÄ°´Å¥¡¢ÏÔʾԱ¾Òþ²ØµÄͼƬµÈµÈ¡£±¾ÎĽ«¾ÍIEµØÖ·À¸µÄʹÓ÷½·¨×öÒ»¸öÏêϸµÄ˵Ã÷¡£
1. ±í´ïʽµÄÊéд·½·¨
ÔÚIEµÄµØÖ·À¸ÖÐÊäÈë javascript:<´úÂë>£¬¼´¿ÉÔÚµ±Ç° ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
A:link { so-language: zxx }
-->
ÃæÏò¶ÔÏó»ù´¡
JavaScript
ÊÇÍêÈ«ÃæÏò¶ÔÏóµÄÓïÑÔ¡£ËùÒÔ²»¿ÉÄÜÒÔ·ÇÃæÏò¶ÔÏóµÄ·½·¨À´Ê¹Óá£
¶ÔÏó£¨
Object
£©
´Ó×î»ù±¾µÄ²ã´ÎÉÏ˵£¬¶ÔÏóÊÇһϵÁÐÊôÐԵļ¯ºÏ£¬ºÍÆäËûÓïÑÔÀïµÄÉ¢Áбí½á¹¹ÀàËÆ¡£
ÀýÈ磺Á½¸ö ......
µÚ4ÕÂ
º¯
Êý
JavaScript
ÖÐ×îºÃµÄÌØÐÔ¾ÍÊÇËü¶Ôº¯ÊýµÄʵÏÖ¡£Ëü¼¸ºõÎÞËù²»ÄÜ¡£µ«ÊÇ£¬Ïë±ØÄãÒ²ÄÜÔ¤Áϵ½£¬º¯ÊýÔÚ
JavaScript
ÀïÒ²²¢·ÇÍòÄÜÒ©¡£
º¯Êý°üº¬Ò»×éÓï¾ä£¬ËüÃÇÊÇ
JavaScript
µÄ»ù´¡Ä£¿éµ¥Ôª£¬ÓÃÓÚ´úÂ븴Óá¢ÐÅÏ¢Òþ²ØºÍ×éºÏµ÷Ó᣺¯ÊýÓÃÓÚÖ¸¶¨¶ÔÏóµÄÐÐΪ¡£Ò»°ãÀ´Ëµ£¬Ëùν±à³Ì¾Í
Êǽ«Ò»×éÐèÇó·Ö½â³ÉÒ» ......
http://blog.csdn.net/mouyong/archive/2009/11/21/4847303.aspx
µÚ3ÕÂ ¶ÔÏó
JavaScriptµÄ¼òµ¥ÀàÐͰüÀ¨Êý×Ö¡¢×Ö·û´®¡¢²¼¶ûÖµ£¨trueºÍfalse£©¡¢nullÖµºÍundefinedÖµ¡£ÆäËûËùÓеÄÖµ¶¼ÊǶÔÏó¡£Êý×Ö¡¢×Ö·û´®ºÍ²¼¶ûÖµ“Ã²ËÆ”¶ÔÏó£¬ÒòΪËüÃÇÓµÓз½·¨£¬µ«ËüÃÇÊDz»¿É±äµÄ¡£JavaScriptÖеĶÔÏóÊǿɱäµÄ¼ü-Öµ ......
http://blog.csdn.net/mouyong/archive/2010/01/25/5252558.aspx
µÚ6Õ Êý×é
Êý×éÊÇÒ»¶ÎÏßÐÔ·ÖÅäµÄÄڴ棬Ëüͨ¹ýÕûÊýÈ¥¼ÆËãÆ«ÒÆ²¢·ÃÎÊÆäÖеÄÔªËØ¡£Êý×é¿ÉÒÔÊǺܿìµÄÊý¾Ý½á¹¹¡£²»ÐÒµÄÊÇ£¬JavaScriptµÄÊý×é²»ÊÇÕâÑùµÄ¡£ËüÌṩÁËÒ»ÖÖÓµÓÐÀàËÆÊý×éÌØÐԵĶÔÏó¡£Ëü°ÑÊý×éµÄϱêת±ä³É×Ö·û´®£¬ÓÃÆä×÷ΪÊôÐÔ¡£ËüÃ÷ÏԵر ......