Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ......

javascript¹öÂÖʼþ


<!doctype html>
<html lang="zh-ch">
<head>
<meta charset="utf-8" />
<meta content="IE=8" http-equiv="X-UA-Compatible"/>
<title>mousewheelµÄʼþ°ó¶¨ by ˾ͽÕýÃÀ</title>
<mce:script type="text/javascript"><!--
window. ......

javascript ÏÂÀ­¿ò£¨select)Ñ¡ÔñÓ뱻ѡÔñ

<html>
<head>
<mce:script type = "text/javascript"><!--

function changetext()
{
var x = document.getElementById("list");
for (var i = 0;i < x.length;i++ )
{
if (x.options[i].selected)
{
document.getElemen ......

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ºÅ