我在后台写了个方法
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>