How can I generate Dynamic Javascript?

后端 未结 4 872
生来不讨喜
生来不讨喜 2020-12-14 12:42

I render a page using YUI. and depending on the user I need to change how it is rendered. This change is not something that can be parametrized, it is drastic and different

4条回答
  •  猫巷女王i
    2020-12-14 13:01

    JavaScript has an eval function, so I think (I haven't tried it) that you can generate JavaScript by writing it into a string variable (and then calling eval on that string variable).

提交回复
热议问题