是否可以在 Javascript 函数中使用结构标签?
是否可以在 JavaScript 函数中使用结构体标签(logic:equal
, logic:match
)?实际上我需要在表的 中动态设置值 来自豆子。我怎样才能实现这个目标?
Is it possible to use the structs tags(logic:equal
, logic:match
) inside a javascript function? Actually I need to set value in the <td>
of the table dynamically getting
from the Bean. How can I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以非编程方式思考你的问题:你是一名站在月球上的宇航员,你意识到你把相机忘了在地球上。你不能只让一个人出现,否则你就不走运,除非你回去一趟。因此,您需要确保从一开始就带上相机,或者花时间回去取相机。
JavaScript 在客户端上运行。您的 Java 代码在服务器上运行。他们不可能一起跑。
当 JavaScript 代码运行时,您的 Java 代码就完全完成运行了。
因此,正如我的月球示例所述,您可以渲染所有内容以开始并使用 JavaScript 显示隐藏它。您的另一个选择是等待内容并使用 XMLHttpRequest 对象调用服务器来获取您想要的内容。
Thinking of your problem in a non programming way: You are an astronaut standing on the moon and you realized you forgot your camera on Earth. You can not just make one appear so you are out of luck unless you take a trip back. So you need to make sure you pack your camera from the beginning or spend the time to travel back to get it.
JavaScript runs on the client. Your Java code runs on the server. It is impossible for them to run together.
By the time the JavaScript code runs your Java code completely done running.
So as my moon example stated, you either render everything out to start and show hide it with JavaScript. Your other option is to wait for the content and use the XMLHttpRequest object to make a call to the server to get what you are after.