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

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");


Ïà¹ØÎĵµ£º

Javascript²Ù×÷Xml

תÔØ×Ô 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ÅжϱäÁ¿ÊÇ·ñ¶¨Òå

Ö±½ÓʹÓÃ䶨ÒåµÄJavascript±äÁ¿Ê±£¬Ò³Ãæ»á±¨´í²¢ÎÞ·¨Ö´ÐУ¬±ÈÈç
if (varName=="")
{
}
ÐèÒªÏÈÅжϱäÁ¿ÊÇ·ñ¶¨Ò壬ʹÓÃtypeofº¯Êý¿ÉÒÔÅжϣ¬ÈçÏÂʹÓãº
if (typeof(ipaddr)=='undefined')
{
window.alert('ipaddr䶨Òå');
} ......

javascriptѧϰС½á

 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 ......

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

 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 ......

javascript Êý×é

 optionsÊý×é
¡¡¡¡¸ÃÊý×éÊÇselect¶ÔÏóµÄÒ»¸öÊôÐÔ,¼´Ñ¡Ôñ¿òÖеÄËùÓÐÑ¡Ïî(<OPTION>)µÄÒ»¸öÁÐ±í¡£
¡¡¡¡ÊôÐÔ
¡¡¡¡defaultSelected Ñ¡ÏîÁбíÖеÄȱʡѡÏî
¡¡¡¡index Ñ¡ÏîÁбíÖÐijѡÏîµÄË÷ÒýλÖÃ
¡¡¡¡length Ñ¡ÏîÁбíÖеÄÑ¡ÏîÊý(<OPTIONS>)
¡¡¡¡name Ñ¡ÏîÁбíµÄÃû×Ö(NAMEÌØÐÔ)
¡¡¡¡selected ±íÊ¾Ñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ