0

<script>... data: [
<%=ser%>, 1 , 1 , 1 , 1 , 1 , 1] ... </script>

代码背后

List<int> list = new List<int>();
ser = serializer.Serialize(list);

变量 ser 不像手动输入的数字 1 那样工作,为什么?

输出

ser = "[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]";
4

1 回答 1

0

最后一次尝试

[<%=ser%>] 

内部代码

ser = ser.Substring(1, ser.Length - 2);

感谢帮助!

于 2013-03-26T22:24:07.110 回答