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µÄʵÏÖµÄMap£¬ÓÃ×Åͦ·½±ãµÄ£¬²»ÖªµÀÐÔÄÜÔõôÑù¡£
×Ô¼ºÓÃÖ»Óв»³¬¹ý10¸öÔªËØ£¬ËùÒÔÐÔÄÜÎÞËùνÁË¡£
/********************jsmap.js**************************/
/////// map Àà
function classMap() {
this.map = new Array();
var struct = function(key,
value){
& ......
Ò»°ãÎÒ們寫Notes For Web ³Ìʽ時ºÜ長Óõ½URL傳遞һЩ資訊,ÔÚRelease 6 ¶àÖ§Ô®ÁË@UrlQueryStringµÄ¹«Ë¾來Ö±½ÓץȡURL參數,ÕæÊǺÃÓõĹ«Ê½°¢.²»過ʹÓÃ這個當È»還ÊdzÔServerµÄ資Ô´(ЧÄÜ),ÄÜÓà JavaScript ......
µÚÒ»ÖÖ:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ÎÞ±êÌâÎ ......
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 ......
js¶ÔÎÄ×Ö½øÐбàÂëÉæ¼°3¸öº¯Êý£ºescape,encodeURI,encodeURIComponent£¬ÏàÓ¦3¸ö½âÂ뺯Êý£ºunescape,decodeURI,decodeURIComponent
1¡¢ ´«µÝ²ÎÊýʱÐèҪʹÓÃencodeURIComponent£¬ÕâÑù×éºÏµÄurl²Å²»»á±»#µÈÌØÊâ×Ö·û½Ø¶Ï¡£ ......