JavaScript±à³Ì±Ê¼Ç
ÐÂÖÐ……
1¡¢Êý¾ÝÀàÐÍÑéÖ¤ÎÊÌâ
Asp.NetËäÈ»ÓÐÑéÖ¤¿Ø¼þ£¬µ«ÊÇÓÐЩ¸´ÔÓµÄÑéÖ¤»¹Êǵô«µ½·þÎñÆ÷ÉϽøÐУ¬ÓÃjsËٶȺÍÐÔÄܶ¼±È½ÏºÃ
<script>
//¼ì²éÊÇ·ñΪÈÎÒâÊý£¨ÊµÊý£©
function isNumeric(strNumber) {
var newPar=/^(-|\+)?\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
//¼ì²éÊÇ·ñΪÕýÊý
function isUnsignedNumeric(strNumber) {
var newPar=/^\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
//¼ì²éÊÇ·ñΪÕûÊý
function isInteger(strInteger) {
var newPar=/^(-|\+)?\d+$/
alert(newPar.test(strInteger)); }
//¼ì²éÊÇ·ñΪÕýÕûÊý
function isUnsignedInteger(strInteger) {
var newPar=/^\d+$/
alert(newPar.test(strInteger)); }
</script>
2¡¢asp.netÖÐÓÃalert£¨£©ÊµÏÖ»»ÐÐÎÊÌâ
asp.netÖÐÓÃresponse.Write("<script>alert('Ìáʾ£º\n²Ù×÷³ö´í£¡');</script>");ÎÞ·¨Ö´ÐС£
½«×Ö·û´®Ð´³É
say="Ìáʾ£º\\n²Ù×÷³ö´í£¡"
say=@"Ìáʾ£º\n²Ù×÷³ö´í£¡"
3¡¢jsʵÏÖË¢ÐÂÑéÖ¤Âë
µ¥»÷ͼƬˢУº
<img id="CheckImg" src="CreatImage.aspx" onclick="this.src='CreatImage.aspx?temp='+Math.random()"/>
µ¥»÷“Ë¢ÐÂÑéÖ¤Âë”°´Å¥Ë¢ÐÂ
function imagechick()
{
form1.CheckImg.src="CreatImage.aspx?temp="+Math.random();
return false;//²»ÉÏ´«µ½·þÎñÆ÷
}
ÆäÖÐCreatImage.aspxΪ²úÉúÑéÖ¤ÂëͼƬµÄÒ³Ã棬ԴÂë¼û£ºC#²úÉúͼÐÎÑéÖ¤Âë
4¡¢jsÖÐʹÓÃÕýÔò±í´ïʽµÄ·½·¨
¸ñʽÊÇ£º/ÕýÔò±í´ïʽ/
±ØÐëÓÃÁ½¸öб¸Ü°ÑÕýÔò±í´ïʽÀ¨ÆðÀ´¡£
Èç·Ç·¨×Ö·û¼ì²âÕýÔò±í´ïʽΪ£º^(?:[\u4e00-\u9fa5]*\w*\s*)+$
ʹÓõĴúÂëΪ£º
var newPar=/^(?:[\u4e00-\u9fa5]*\w*\s*)+$/;
if(newPar.test("1234&1238*_~"))
{
&
Ïà¹ØÎĵµ£º
Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......
µÚÆßÕ Ajax Òì²½JavaScriptºÍXML
Ajax is a cornerstone of high-performance JavaScript. It can be used to make a page load faster by delaying the download of large resources. It can prevent page loads altogether by allowing for data to be transferred between the client ......
Data Formats Êý¾Ý¸ñʽ
When considering data transmission techniques, you must take into account several factors: feature set, compatibility, performance, and direction (to or from the server). When considering data formats, the only scale you need for comparison is speed.
......
Fiddler
Fiddler is an HTTP debugging proxy that examines the assets coming over the wire and helps identify any loading bottlenecks. Created by Eric Lawrence, this is a general purpose network analysis tool for Windows that provides detailed reports on any browser or web request. ......
Summary ×ܽá
When web pages or applications begin to feel slow, analyzing assets as they come over the wire and profiling scripts while they are running allows you to focus your optimization efforts where they are needed most.
µ±ÍøÒ³»òÓ¦ÓóÌÐò±äÂýʱ£¬·ÖÎ ......