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

silverlightÓëjavascript½»»¥²Ù×÷

ÔÚsilverlight¿ª·¢ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃjsÀ´µ÷ÓÃsilverlightÖеķ½·¨£¨µ±È»·½·¨ÉÏÒªÀ¦°óÏàÓ¦ÊôÐÔ£©£¬Ò²¿ÉÒÔ½«Ö¸¶¨
µÄjs·½·¨°ó¶¨µ½silverlightÓ¦ÓÃÖеÄʼþÉÏ£®±¾DEMOÑÝʾÁËͨ¹ýjsµ÷ÓÃÍê³ÉsilverlightÊý¾ÝÁÐ±í¿Ø¼þ(DataGrid)µÄÊý
¾Ý°ó¶¨²Ù×÷£¬²¢Í¨¹ýDataGridµÄEmployeeList_BeginningCellEditʼþ½«µ±Ç°Ñ¡È¡µÄÊý¾ÝÐÐÐÅÏ¢·µ»Øµ½jsËù°ó¶¨µÄ
ʼþ²ÎÊýÉÏ£¬²¢µ÷ÓøÃjs·½·¨ÏÔʾѡÖÐÊý¾ÝÐÐÐÅÏ¢£¬ÈçÏÂͼËùʾ:
           
  
     ÏÂÃæ½éÉÜÒ»ÏÂÖ÷ÒªµÄ¿ª·¢¹ý³Ì:)
  
     Ê×ÏÈ£¬ÎÒÃÇÐèÒª½¨Á¢Ò»¸öSilverlight Application £¬Ãû³ÆÎª£ºSilverlight_JS_call.
  
     È»ºóÎÒÃÇÒªÔÚµ±Ç°µÄÏîÄ¿ÖмÓÈëÒ»¸öÀàÎļþ£¬Ãû³ÆÎª£ºEmployeeInfo.cs.
  
     ÏÂÃæÊÇÏàÓ¦µÄ´úÂ룬Ïà¹ØÄÚÈݼû×¢ÊÍ:  
[ScriptableType]
public class EmployeeInfo
{
    /// <summary>
    /// ¹ÍÔ±±àºÅ
    /// </summary>
     [ScriptableMember]
    public int EmployeeNo { get; set; }
    /// <summary>
    /// ¹ÍÔ±Ãû³Æ
    /// </summary>
     [ScriptableMember]
    public string EmployeeName { get; set; }
    /// <summary>
    /// µØÖ·
    /// </summary>
     [ScriptableMember]
    public string Address { get; set; }
}
/// <summary>
/// ¹ÍԱʼþ²ÎÊý£¨ÓÃÓÚÍê³ÉÓëjs°ó¶¨Ê¼þ²ÎÊý£©
/// </summary>
[ScriptableType]
public class EmployeeInfoEventArgs : EventArgs
{
     [ScriptableMember]
    public EmployeeInfo employeeInfo{ get; set; }
}
/// <summary>
/// Ҫע²á²¢ÔÚÒ³ÃæÖÐʹÓõÄjsµ÷Óýű¾¶ÔÏó
/// </summary>
[ScriptableType]
public class JavaScriptableObject
{
&nb


Ïà¹ØÎĵµ£º

Êղر¾Ò³¹¦ÄܵÄJavascript´úÂë ¼æÈÝIEºÍFirefoxµÄ

< a href =
"#"
 
onClick =
"javascript:window.external.AddFavorite(document.URL,document.title);return
false"
rel=
"sidebar"
> Êղر¾Ò³ </ a >
È¡µÃµ±Ç°Ò³µÄURL: document.URL
È¡µÃµ±Ç°Ò³µÄtitle: document.title
ʵÏÖÔÚFirefoxÖГÊÕ
²Ø±¾Ò ......

Ñо¿Ò»ÏÂJavaScriptµÄº¯Êý»Øµ÷»úÖÆ

Ñо¿Ò»ÏÂJavaScriptµÄº¯Êý»Øµ÷»úÖÆ
1¡¢±³¾°
JavascriptÖеĻص÷º¯Êý£¬ÏàÐÅ´ó¼Ò¶¼²»Ä°Éú£¬×îÃ÷ÏÔµÄÀý×ÓÊÇ×öAjaxÇëÇóʱ£¬ÌṩµÄ»Øµ÷º¯Êý£¬
ʵ¼ÊÉÏDOM½ÚµãµÄʼþ´¦Àí·½·¨£¨onclick,ondblclickµÈ£©Ò²Êǻص÷º¯Êý¡£
ÔÚʹÓÃDWRµÄʱºò£¬»Øµ÷º¯Êý¿ÉÒÔ×÷ΪµÚÒ»¸ö»òÕß×îºóÒ»¸ö²ÎÊý³öÏÖ£¬È磺
function callBack(result){
}
myD ......

VS2005ÈçºÎµ÷ÊÔaspxÖÐJavaScript½Å±¾

Ê×ÏÈÉèÖÃIE,   ÒÀ´ÎÑ¡Ôñ ¹¤¾ß-> Internet   Ñ¡Ïî->   ¸ß¼¶, ÕÒµ½ ä¯ÀÀ ϵÄÁ½¸ö½ûÓýű¾µ÷ÊÔ¸´Ñ¡¿ò, ½«ÆäÈ¡ÏûÑ¡Ôñ(IEĬÈϽ«ÕâÁ½ÏîÑ¡ÖÐ, ²»ÄܽøÐнű¾µ÷ÊÔ), 
1. µ÷ÊÔJS½Å±¾Îļþ(*.jsÎļþ)
Ö±½ÓÔÚJSÎļþÖÐF9ÉèÖöϵã, F5ÔËÐе÷ÊÔ¼´¿É.
2. µ÷ÊÔÒ³ÃæÎļþÖнű¾(*.aspxÖÐJS½Å±¾) ......

What can a JavaScript do?


JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
JavaScript can put dynamic text into an HTML page - A Ja ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ