Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Cookie µÄÕýÈ·Ó÷¨

function getCookies(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return '';
}
function setCookie(name, value, expires,
function getCookies(name)
{
var a ......

ÉîÈëÀí½âJavaScript±Õ°ü£¨closure£©

×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨Á ......

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

ÉîÈëÀí½â JavaScript±Õ°ü(closure)

Ò»¡¢Ê²Ã´ÊDZհü£¿ ¡°¹Ù·½¡±µÄ½âÊÍÊÇ£º±Õ°üÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨ÁËÕâЩ±äÁ¿µÄ»·¾³µÄ±í´ïʽ£¨Í¨³£ÊÇÒ»¸öº¯Êý£©£¬Òò¶øÕâЩ±äÁ¿Ò²ÊǸñí´ïʽµÄÒ»²¿·Ö¡£
ÏàÐźÜÉÙÓÐÈËÄÜÖ±½Ó¿´¶®Õâ¾ä»°£¬ÒòΪËûÃèÊöµÄ̫ѧÊõ¡£ÆäʵÕâ¾ä»°Í¨Ë×µÄÀ´Ëµ¾ÍÊÇ£ºJavaScriptÖÐËùÓеÄfunction¶¼ÊÇÒ»¸ö±Õ°ü¡£²»¹ýÒ»°ãÀ´Ëµ£¬Ç¶Ì×µÄfunctionËù²úÉúµÄ± ......

Client Side JavaScript Validation

Struts Validator Framework provides an easy-to-use mechanism for performing client-side validation. It's very useful to validate some fields on the client-side before sending the data to the server for processing. By this way we can ensure that the data send to the server is valid. Performing valida ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ