How to set the JSTL variable value in javascript?

后端 未结 8 2126
我在风中等你
我在风中等你 2020-11-27 16:56

How to set the JSTL variable value in java script?



        
8条回答
  •  猫巷女王i
    2020-11-27 17:43

    Just don't. Don't write code with code. Write a JSON object or a var somewhere but for the love of a sensible HTTP divide, don't write JavaScript functions or methods hardcoded with vars/properties provided by JSTL. Generating JSON is cool. It ends there or your UI dev hates you.

    Imagine if you had to dig into JavaScript to find something that was setting parameters in the middle of a class that originated on the client-side. It's awful. Pass data back and forth. Handle the data. But don't try to generate actual code.

提交回复
热议问题