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

ASP.NETµ÷ÓÃjavascript½Å±¾µÄ·½·¨

1¡¢Ö±½ÓÔÚǰ̨µ÷Óà javascript º¯Êý
ºÜ¼òµ¥,ÔÚ head ÔªËØÖ®¼ä¼ÓÈë script ÔªËØ,½« type ÔªËØÉèÖÃΪ " text/javascript "
Èç:
<head runat="server">
<script type="text/javascript" >
function ShowName(str)
{
alert("ÄúµÄÃû×ÖΪ:("+str+")");
}
</script>
    <title>using javascript</title>
</head>
Ö®ºóÔÚbody ÔªËؼä,ͨ¹ýʼþÀ´·ÃÎÊ Èç Ҫͨ¹ýbutton1 µÄµ¥»÷ʼþ(onclientclick)À´·ÃÎÊ javascript º¯Êý
ʾÀýÈçÏÂ:
<asp:Button ID="Button1" runat="server" Text="Button" onclientclick="ShowName('XXX')" />
ÕâʱÔËÐÐÏîÄ¿,µ¥»÷ buttonʱ,»áÏÔʾ"ÄúµÄÃû³ÆΪXXX"
Õâ¾ÍÊÇÒ»¸ö¼òµ¥µÄjavascript º¯Êý.
2¡¢ÔÚǰ̨ͨ¹ý jsÎļþ µ÷ÓÃ
·½·¨Óë £¨1£©Ò»Ñù Ö»²»¹ýÐèÒªÖ¸¶¨ .js Îļþ
ʾÀýÈçÏÂ:
<head runat="server">
<script type="text/javascript" src="JScript.js">
</script>
    <title>using javascript</title>
</head>
Ö®ºóÔÚbody ÔªËؼä,ͨ¹ýʼþÀ´·ÃÎÊ Èç Ҫͨ¹ýbutton1 µÄµ¥»÷ʼþ(onclientclick)À´·ÃÎÊ javascript º¯Êý
ʾÀýÈçÏÂ:
//´Ëʱ .jsÎļþÖбØÐëÓÐ ShowName ·½·¨
<asp:Button ID="Button1" runat="server" Text="Button" onclientclick="ShowName('XXX')" />
3¡¢ÔÚºǫ́µ÷Óà javascript º¯Êý,º¯ÊýÔÚ.jsÎļþÖÐ
ǰ̨µÄhead ÔªËØ
<head runat="server">
<script type="text/javascript" src="JScript.js">
</script>
    <title>using javascript</title>
</head>
ºǫ́µÄÐèÒªÌí¼ÓÈçÏ´úÂë
Button1.Attributes.Add("onclick", "showname1(XXX)");
4¡¢ÔÚºǫ́µ÷Óà javascript º¯Êý,º¯ÊýдÔÚ .jsÎļþÖÐ,µ«²¢Ã»ÓÐÔÚǰ̨¶¨Òå
//»ñµÃ.jsÎļþ
string myscript = "JScript.js";
//×¢²á.jsÎļþ, Èç¹û´Ëʱ²é¿´Ô´Âë,»áµÃµ½ÈçÏ´úÂë
//<script> src ="JScript.js" type="text/javascript"><script>
Page.ClientScript.RegisterClientScriptInclude("myKey", myscript);
//ͬÉÏ
Button1.Attributes.Add("onclick", "showname1(123)");
5. ÓÃResponse.Write·½·¨Ð´Èë½Å±¾
±ÈÈçÔÚÄãµ¥»÷°´Å¥ºó£¬ÏȲÙ×÷Êý¾Ý¿â£¬ÍêÁ˺óÏÔʾÒѾ­Íê³É£¬¿ÉÒÔÔÚ×îºóÏëµ÷Óõĵط½Ð´ÉÏ
Response.Write("<script type='text/javascript'


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â

ugmbbc·¢²¼ÓÚ 2009-11-14 09:41:43| 7628 ´ÎÔĶÁ ×ÖÌ壺´ó С ´òÓ¡Ô¤ÀÀ
var ReTitle = '»Ø¸´:Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â';
¸ÐлCOMSHARP CMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:tripwiremagazine.com
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ ......

ASP.NETÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄÜ·½·¨(1


     1.      Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯ ¡¡¡¡
1.1Êý¾Ý¿âµÄ Á¬½ÓºÍ¹Ø±Õ ¡¡¡¡
·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔ ......

ASP.NETÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄÜ·½·¨(6


 
6. Ö»Òª¿ÉÄÜ£¬¾Í»º´æÊý¾ÝºÍÒ³Êä³ö ¡¡¡¡
ASP.NET ÌṩÁËһЩ¼òµ¥µÄ»úÖÆ£¬ËüÃÇ»áÔÚ²»ÐèҪΪÿ¸öÒ³ÇëÇó¶¯Ì¬¼ÆËãÒ³Êä³ö»òÊý¾Ýʱ»º´æÕâЩҳÊä³ö»òÊý¾Ý¡£ÁíÍ⣬ͨ¹ýÉè¼ÆÒª½øÐлº´æµÄÒ³ºÍÊý¾ÝÇëÇó(ÌرðÊÇÔÚÕ¾µãÖÐÔ¤ÆÚ½«ÓнϴóͨѶÁ¿µÄÇøÓò)£¬¿ÉÒÔÓÅ»¯ÕâЩҳµÄÐÔÄÜ¡£Óë .NET Framework µÄÈκΠWeb ´°Ì幦ÄÜÏà±È£¬Êʵ±µØÊ ......

ASP.NETÊý¾Ý°ó¶¨¸ÅÊöºÍÓï·¨

 Êý¾Ý°ó¶¨¸ÅÊöºÍÓï·¨
ASP.NET ÒýÈëÁËеÄÉùÃ÷ÐÔÊý¾Ý°ó¶¨Óï·¨¡£ÕâÖַdz£Áé»îµÄÓï·¨ÔÊÐí¿ª·¢ÈËÔ±²»½ö¿ÉÒ԰󶨵½Êý¾ÝÔ´£¬¶øÇÒ¿ÉÒ԰󶨵½¼òµ¥ÊôÐÔ¡¢¼¯ºÏ¡¢±í´ïʽÉõÖÁÊÇ´Ó·½·¨µ÷Ó÷µ»ØµÄ½á¹û¡£Ï±íÏÔʾÁËÐÂÓï·¨µÄһЩʾÀý¡£
¼òµ¥ÊôÐÔ Customer: <%# custID %>
¼¯ºÏ Orders: <asp:ListBox id="List1" datasour ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ