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

¡¾PB.NET±à³ÌϵÁÐ6¡¿ÀûÓÃJavaScript½øÐпͻ§¶Ë±à³Ì

¡¾PB.NET±à³ÌϵÁÐ6¡¿ÀûÓÃJavaScript½øÐпͻ§¶Ë±à³Ì
ÆÕͨWEB³ÌÐòÊÇÓÉä¯ÀÀÆ÷·¢³öÇëÇ󣬷þÎñÆ÷ÒÔHTMLÐÎʽ·µ»Ø½á¹û¡£Ò»°ãÇé¿öÏÂÎÒÃÇÔÚPBµÄʼþÀï±àдµÄÈκζԿͻ§¶ËʼþµÄÏìÓ¦´úÂ붼»á²úÉúÒ»´ÎÓë·þÎñÆ÷µÄ½»»¥¹ý³Ì£ºµ±Ò»¸ö¿Í»§¶Ëʼþ±»´¥·¢Ê±£¬JavaScriptÖÐÓÐÒ»¸ö¶ÔÓ¦µÄʼþÈ¥Ïò·þÎñÆ÷·¢ÆðÇëÇ󣬷þÎñÆ÷¶Ë»áµ÷ÓöÔӦʼþµÄ´úÂë²¢½«½á¹û·µ»Ø¸ø¿Í»§¶Ë£¬¶ÔÓÚ¿Í»§À´ËµÒ»¸öÖ±½ÓµÄ¸Ð¹Û¾ÍÊÇÆÁÄ»±»Ë¢ÐÂÁËÒ»´Î¡£ÎªÁ˼õÉÙÕâÑùµÄpostback£¬ÎÒÃÇ¿ÉÒÔÀûÓÃJavaScript¶Ô¿Í»§¶Ë½øÐбà³ÌÒÔÌá¸ßWEB³ÌÐòµÄÐÔÄܺÍÓû§ÌåÑé¡£
Òª¶Ô¿Í»§¶Ëʼþ½øÐбà³Ì£¬±ØÐ轫ÎÒÃǵĴúÂë°üº¬ÔÚÒ»¸öÌõ¼þ±àÒëµÄ´úÂë¿éÀïÃ棬±àÒëÆ÷»áʶ±ð²¢ÓëÆÕͨpower script´úÂëÇø·Ö¿ªÀ´¡£ÔÚ×Ô¶¨ÒåµÄJavaScriptʼþÀï¿ÉÒÔͨ¹ýʹÓõ÷ÓÃDocument.Form.Submit»òPBȱʡµÄÒѶ¨ÒåʼþÀ´½Ó¹Ü±»´¥·¢µÄʼþ¡£
ÏÂÃæµÄÀý×Óͨ¹ýÒ»¸ö×Ô¶¨ÒåµÄ¿Í»§¶ËJavaScriptʼþ´úÂëÀ´È¡´úDATAWINDOWµÄItemChangedʼþ£¬Õâ¶Î´úÂëµÄÒâ˼ÊÇÈç¹ûÊǵÚÒ»ÁлòµÚ¶þÁеÄÖµ±»¸Ä±ä£¬ÄÇôµ÷ÓÃȱʡµÄJavaScriptʼþPBDataWindow_ItemChangedRejectÀ´È¡ÏûÖµµÄ¸Ä±ä¡£ÔÚÕâ¸öÀý×ÓÀïȱʡʼþ½«²»»á²úÉúpostback£¬Èç¹û²»ÊǵÚÒ»ºÍµÚ¶þÁн«²»»á´¥·¢¿Í»§¶Ë´úÂë¡£
//Start MyScriptFile.js
function MyItemChanged(sender, rowNumber, columnName, newValue)
{
if(columnName == "column1" || columnName == "column2")
{
// The default function is invoked
return PBDataWindow_ItemChangedReject(sender, rowNumber, columnName, newValue)
}
else
{
//do nothing
}
}
//End MyScriptFile.js
½Ó¹ÜµÄJavaScriptʼþдÔÚÒ»¸öÌõ¼þ±àÒë´úÂë¿éÀï:
#IF DEFINED PBWEBFORM THEN
dw_1.JavaScriptFile = "MyScriptFile.js"
dw_1.OnClientItemChanged = "MyItemChanged"
#END IF
ȱʡµÄJavaScriptʼþ
µ±ÎÒÃÇ·¢²¼³ÌÐòʱÎļþPBDataWindow.js »á¿½±´µ½·þÎñÆ÷applicationName\ScriptsĿ¼Ï£¬ÔÚÕâ¸öÎļþÀﶨÒåÁËһЩȱʡʼþ¹©ÎÒÃǵ÷Óᣵ÷ÓÃÕâЩȱʡµÄʼþ½«»áµ¼ÖÂÒ»´Îpostback»òÑÓʱµÄpostbak£¬Ò²ÓÐЩʼþ²»²úÉúpostback£¬ÃæµÄÁбíÁгöÁËÕâЩʼþºÍ²î±ð¡£ÔÚÇ°ÃæµÄÀý×ÓÖÐÎÒÃÇʹÓÃÀàËÆdw_1.OnClientʼþÃû = "×Ô¶¨ÒåJSº¯Êý"ÕâÑùµÄ´úÂë½Ó¹ÜÁ˶ÔÓ¦µÄDW¶ÔӦʼþµÄ´úÂ룬дÔÚDW¶ÔӦʼþÀïµÄ´úÂ뽫²»»áÔÙ±»µ÷Óã¬Èç¹ûÎÒÃÇÏëÖØд¥·¢ÕâЩ´úÂ룬¾Í±ØÐèʹÓÃϱíµÄJavaScriptʼþÁË£¬µ÷ÓÃÕâЩʼþʱ±ØÐèÊ


Ïà¹ØÎĵµ£º

JavaScriptÅжÏä¯ÀÀÆ÷ÀàÐͼ°°æ±¾

      ÄãÖªµÀÊÀ½çÉÏÓжàÉÙÖÖä¯ÀÀÆ÷Â𣿳ýÁËÎÒÃÇÊìÖªµÄIE, Firefox, Opera, SafariËÄ´óä¯ÀÀÆ÷Ö®Í⣬ÊÀ½çÉÏ»¹Óнü°ÙÖÖä¯ÀÀÆ÷¡£
       ¼¸ÌìÇ°£¬ä¯ÀÀÆ÷¼Ò×åÓиյ®ÉúÁËһλСÍõ×Ó£¬¾ÍÊÇGoogleÍƳöµÄChromeä¯ÀÀÆ÷¡£ÓÉÓÚChrome³öÉúÃûÃÅ£¬¾¡¹ÜËû»¹ÊǸöС¼Ò»ï£¬Ã»ÓÐÈ˸ÒС ......

javascript£»Æ´Í¼ÓÎÏ·£¨¿É×ÔѡͼƬºÍÉèÖÃÐÐÁÐÊý£©

˼·£ºä¯ÀÀͼƬ£¬¶ÁÈ¡Æä¿í¶ÈImageW£¬¸ß¶ÈÖµImageH¡£¶ÁÈ¡Óû§ÊäÈëµÄ·Ö³É¼¸ÐÐRow¼¸ÁÐCol¡£
         ÿ¸ö·½¿é£ºboxW=ImageW/Col£»boxH=ImageH/Row£»
         ÔÚ1µ½Row*ColÖÐËæ»ú£¬µÚi¸öͼƬµÄλÖÃÉèΪpos¡¾i¡¿¡£È»ºó¶¯Ì¬´´½¨divÉú³ÉRow* ......

10¸ö·Ç³£°ôµÄAjax¼°JavascriptʵÀý×ÊÔ´ÍøÕ¾

1.Ajax Rain
¡¡¡¡AjaxRainÓкܶàÍêÃÀÕûºÏAJAX, CSS, DHTML »ò JavascriptµÄʵÀý£¬ÓÐһЩDemoµÄÈ·ÖµµÃÄãÈ¥¿´Ò»¿´£¬¼´Ê¹Äã²»ÊÇÍøÒ³Éè¼Æ(¿ª·¢)ʦ¡£
Ajax/JavascriptʵÀý:
 EXT JS Date Picker
 jQuery Feed Menu
 jGrowl
 FastFind Menu – Jquery
 Spiffy Accordion
2.Ajax Daddy ......

[JavaScript]ÀàÖ®Èý


Ïê½âjavascriptÀà¼Ì³Ð»úÖƵÄÔ­Àí
Ä¿Ç° javascriptµÄʵÏּ̳з½Ê½²¢²»ÊÇͨ¹ý“extend”¹Ø¼ü×ÖÀ´ÊµÏֵģ¬¶øÊÇͨ¹ýconstructor functionºÍprototypeÊôÐÔÀ´ÊµÏּ̳С£Ê×ÏÈÎÒÃÇ´´½¨Ò»¸öanimalÀà
js ´úÂë
 
 var animal = function(){  //Õâ¾ÍÊÇconstructor function ÁË&nbs ......

JavaScript ÕýÔò±í´ïʽ Ñ¡Ôñ¡¢·Ö×éºÍÒýÓÃ

JavaScriptµÄÕýÔò±í´ïʽ֧³Ö²¼¶û²Ù×÷£¬³ýÁË×÷Ϊ Ñ¡ÔñµÄ“²¼¶û»ò”²Ù×÷Ö®Í⣬ÕýÔò±í´ïʽ»¹Ö§³Ö·Ö×éºÍÒýÓÃ
¡£ÆäʵѡÔñ¡¢·Ö×éºÍÒýÓõÄ×÷Ó÷ֱðΪ£ºÖ¸¶¨Ñ¡ÔñÏî¡¢¶Ô×Ó±í´ïʽ·Ö×éºÍÒýÓà ǰһ×Ó±í´ïʽµÄÌØÊâ×Ö·û¡£
ÕýÔò±í´ïʽµÄÑ¡Ôñ£º
ËùνѡÔñ¼´ÔÚ¶à¸öÌõ¼þÀïÃæÑ¡ÔñÒ»¸ö£¬±ÈÈç˵ÂôË®¹ûµÄ´óү˵ËÍÄã¸öË®¹û£¬Äã¿ÉÒÔÑ¡Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ