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
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
Íê³ÉÒÔϲ¿·Ö£º
1. Ê÷¿ÉÒÔ½ÓÊÜsingleXml¸ñʽºÍjsonÒÔ¼°jsonarray¸ñʽµÄÊý¾Ý£»
2. ¸´Ñ¡¿ò¹´Ñ¡ºÍÕÛµþ×Ó½ÚµãµÄÂß¼ÓÃdivǶÌ×À´ÊµÏÖ,ЧÂʸü¸ß;²¢ÌṩÁË¿ìËÙ»Ê÷µÄ·½·¨;(´æÔÚbug:¿ìËÙ»Ê÷ЧÂʲ¢²»¸ß,divǶÌ×ÓÐÎÊÌâ);
3.Ôö¼ÓÊ÷µÄÉî¶È this.depth ......
´ó¼Ò¶¼ÖªµÀ£¬.NETÖÐһЩWeb·þÎñÆ÷¿Ø¼þ½âÎö²¢±àÒ룬×îÖÕ±»äÖȾµÄʱºò£¬ÆäʵÊÇת»¯³ÉÁËÆÕͨµÄhtml¿Ø¼þ£¬±ÈÈç<asp:LinkButton>¿Ø¼þ¾Í±»äÖȾ³ÉÁË<a>êµã¿Ø¼þ£¬ÕâÀïÒª½²µÄDropDownList¿Ø¼þÒ²Ò»Ñù£¬±»äÖȾ³ÉÁËÆÕͨµÄselect¿Ø¼þ£¬ÔÚÈçϵÄasp.netÒ³ÃæÖж¨ÒåÁËÒ»¸öweb·þÎñÆ÷¿Ø¼þDropDownListºÍÒ»¸öÆÕͨµÄselect¿Ø¼þ£¨Ö÷ ......
js¶ÔÎÄ×Ö½øÐбàÂëÉæ¼°3¸öº¯Êý£ºescape,encodeURI,encodeURIComponent£¬ÏàÓ¦3¸ö½âÂ뺯Êý£ºunescape,decodeURI,decodeURIComponent
1¡¢ ´«µÝ²ÎÊýʱÐèҪʹÓÃencodeURIComponent£¬ÕâÑù×éºÏµÄurl²Å²»»á±»#µÈÌØÊâ×Ö·û½Ø¶Ï¡£ ......
µÚÒ»ÖÖ:
+Õ¹¿ª
-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 ......