首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

javascrip 调用后盾或类中的方法

2013-02-24 
javascrip 调用后台或类中的方法我在后台写了个方法public string[] GetList(){string[] strList {1231

javascrip 调用后台或类中的方法
我在后台写了个方法
public string[] GetList()
{
    string[] strList = {"123123","456456"};
    return strList;
}
怎样用最简单的方法在<javascript type="text/javascript"></javascript>中调用 asp.net javascript 调用 方法
[解决办法]
<script language="javascript" type="text/javascript">
        var ary = '<%=String.Join(",",GetList())%>';
        alert(ary);
    </script>

热点排行