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

JavaScript ÅжÏÉÏ´«ÎļþÀàÐÍ

function
 Check_FileType(str)
{
 
var
 pos 
=
 str.lastIndexOf(
"
.
"
);
 
var
 lastname 
=
 str.substring(pos,str.length)  //´Ë´¦Îļþºó׺ÃûÒ²¿ÉÓÃÊý×鷽ʽ»ñµÃstr.split(".")
 
if
 (lastname.toLowerCase()
!=
"
.jpg
"
 
&&
 lastname.toLowerCase()
!=
"
.gif
"
)
 
{
     alert(
"
ÄúÉÏ´«µÄÎļþÀàÐÍΪ
"
+
lastname
+
"
£¬Í¼Æ¬±ØÐëΪ.jpg,.gifÀàÐÍ
"
);
     document.myform.pic.focus();
     
return
 
false
;
 }
 
else
 
 
{
  
return
 
true
;
 }
}
http://www.cnblogs.com/SList/archive/2005/11/09/272164.html


Ïà¹ØÎĵµ£º

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

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

×î½ü×Ô¼ºÔÚдjavascript/html/cssµÄÊ÷¿Ø¼þ

    Íê³ÉÒÔϲ¿·Ö£º
    1. Ê÷¿ÉÒÔ½ÓÊÜsingleXml¸ñʽºÍjsonÒÔ¼°jsonarray¸ñʽµÄÊý¾Ý£»
    2. ¸´Ñ¡¿ò¹´Ñ¡ºÍÕÛµþ×Ó½ÚµãµÄÂß¼­ÓÃdivǶÌ×À´ÊµÏÖ,ЧÂʸü¸ß;²¢ÌṩÁË¿ìËÙ»­Ê÷µÄ·½·¨;(´æÔÚbug:¿ìËÙ»­Ê÷ЧÂʲ¢²»¸ß,divǶÌ×ÓÐÎÊÌâ);
    3.Ôö¼ÓÊ÷µÄÉî¶È this.depth ......

JavaScriptÓëDropDownList

´ó¼Ò¶¼ÖªµÀ£¬.NETÖÐһЩWeb·þÎñÆ÷¿Ø¼þ½âÎö²¢±àÒ룬×îÖÕ±»äÖȾµÄʱºò£¬ÆäʵÊÇת»¯³ÉÁËÆÕͨµÄhtml¿Ø¼þ£¬±ÈÈç<asp:LinkButton>¿Ø¼þ¾Í±»äÖȾ³ÉÁË<a>êµã¿Ø¼þ£¬ÕâÀïÒª½²µÄDropDownList¿Ø¼þÒ²Ò»Ñù£¬±»äÖȾ³ÉÁËÆÕͨµÄselect¿Ø¼þ£¬ÔÚÈçϵÄasp.netÒ³ÃæÖж¨ÒåÁËÒ»¸öweb·þÎñÆ÷¿Ø¼þDropDownListºÍÒ»¸öÆÕͨµÄselect¿Ø¼þ£¨Ö÷ ......

JavaScriptÖÐµÄ escape,encodeURI,encodeURIComponent


js¶ÔÎÄ×Ö½øÐбàÂëÉæ¼°3¸öº¯Êý£ºescape,encodeURI,encodeURIComponent£¬ÏàÓ¦3¸ö½âÂ뺯Êý£ºunescape,decodeURI,decodeURIComponent
1¡¢   ´«µÝ²ÎÊýʱÐèҪʹÓÃencodeURIComponent£¬ÕâÑù×éºÏµÄurl²Å²»»á±»#µÈÌØÊâ×Ö·û½Ø¶Ï¡£               ......

javascript»ñÈ¡·þÎñ¶Ë¿Ø¼þÖµµÄÁ½ÖÖ°ì·¨

µÚÒ»ÖÖ:
+Õ¹¿ª
-HTML
<html> 
<head> 
</head> 
<body> 
<form name="form1"> 
<input type="text" name="getinfo" value="http://www.shuwo.net" size="40"><button onclick="alert(document.form1.getinfo.value ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ