javascript »ñÈ¡URL²ÎÊý
function getQueryString(queryStringName)
{
var returnValue="";
var URLString=new String(document.location);
var serachLocation=-1;
var queryStringLength=queryStringName.length;
do
{
serachLocation=URLString.indexOf(queryStringName+"\=");
if (serachLocation!=-1)
{
if ((URLString.charAt(serachLocation-1)=='?') || (URLString.charAt(serachLocation-1)=='&'))
{
URLString=URLString.substr(serachLocation);
break;
}
URLString=URLString.substr(serachLocation+queryStringLength+1);
}
}
while (serachLocation!=-1)
if (serachLocation!=-1)
{
var seperatorLocation=URLString.indexOf("&");
if (seperatorLocation==-1)
{
returnValue=URLString.substr(queryStringLength+1);
}
else
{
returnValue=URLString.substring(queryStringLength+1,seperatorLocation);
}
}
return returnValue;
}
var strKeyword=getQueryString("Keyword");
var strType=getQueryString("Type");
Ïà¹ØÎĵµ£º
תÔØ×Ô http://hi.baidu.com/leizuman/blog/item/b9e93f015e86f20e7bec2cde.html
1.xmlÎļþÈçÏ£º
<?xml version="1.0" encoding="UTF-8"?>
<zip>
<city>
mycity</city>
<state>mystate</state>
</zip>
2.¶Á´ËxmlµÄjavascriptÀý×Ó£º
<!DOCTYPE HTML PUBLIC "-//W3C/ ......
Ö±½ÓʹÓÃ䶨ÒåµÄJavascript±äÁ¿Ê±£¬Ò³Ãæ»á±¨´í²¢ÎÞ·¨Ö´ÐУ¬±ÈÈç
if (varName=="")
{
}
ÐèÒªÏÈÅжϱäÁ¿ÊÇ·ñ¶¨Ò壬ʹÓÃtypeofº¯Êý¿ÉÒÔÅжϣ¬ÈçÏÂʹÓãº
if (typeof(ipaddr)=='undefined')
{
window.alert('ipaddr䶨Òå');
} ......
0.Á´½ÓcssÎļþºÍjsÎļþ
<link rel="stylesheet" href="../css/style.css" mce_href="css/style.css" type="text/css">
<mce:script language="javascript" src="../includes/jslib.js" mce_src="includes/jslib.js" ></mce:script>
1.¹Ø±ÕÊäÈë·¨
<input style="ime-mode ......
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 ......
optionsÊý×é
¡¡¡¡¸ÃÊý×éÊÇselect¶ÔÏóµÄÒ»¸öÊôÐÔ,¼´Ñ¡Ôñ¿òÖеÄËùÓÐÑ¡Ïî(<OPTION>)µÄÒ»¸öÁÐ±í¡£
¡¡¡¡ÊôÐÔ
¡¡¡¡defaultSelected Ñ¡ÏîÁбíÖеÄȱʡѡÏî
¡¡¡¡index Ñ¡ÏîÁбíÖÐijѡÏîµÄË÷ÒýλÖÃ
¡¡¡¡length Ñ¡ÏîÁбíÖеÄÑ¡ÏîÊý(<OPTIONS>)
¡¡¡¡name Ñ¡ÏîÁбíµÄÃû×Ö(NAMEÌØÐÔ)
¡¡¡¡selected ±íÊ¾Ñ ......