标签:js
后台:
List result = new ArrayList(); result.add("abc"); result.add("bcd"); request.setAttribute("result", result);
js实现:
<script language=javascript> var arrList = new Array(); arrList = "${result}".replace('[','').replace(']','').split(','); alert(arrList); // 输出 abc,bcd </script>
标签:js
原文地址:http://blog.csdn.net/ahhmdwg/article/details/41073537