How to transfer java array to javaScript array using jsp?

后端 未结 6 756
闹比i
闹比i 2020-12-06 01:51

I have a list of strings on my server which I am trying to get to the client in the form of an array. The code I am attempting to use is the following:

Within the js

6条回答
  •  失恋的感觉
    2020-12-06 02:28

    Try using JSON (Javascript object notation) it'd be quite simple to encode the array and decode it on javascript

    check it out here

    http://www.json.org/java/index.html

提交回复
热议问题