Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究 Struts 模型,我只是想知道如何通过警报窗口显示结果消息。
此代码返回的结果消息:
<html:messages id="msg" header="message.header" footer="message.footer"> <li><b><bean:write name="msg" /></b></li> </html:messages>
试试这个解决方法。可以用表达式语言替换“bean:write”标签。
<script>var txt = '';</script> <html:messages id="msg"> <script>txt += '${msg}\n';</script> </html:messages> <script>alert(txt);</script>