【发布时间】:2012-04-17 12:48:08
【问题描述】:
我在我的 Servlet 中使用以下代码来设置属性 confirmMsg :
req.setAttribute("confirmMsg", "Update Values");
这个我转发给 JSP
RequestDispatcher rd = req.getRequestDispatcher("displayDetails.jsp");
rd.forward(req, resp);
在我的 JSP 中,我需要在页面加载时显示消息。
<body onload = "showConfirmMsg();">
// .....
</body>
在下面的函数中我应该怎么做才能显示消息onload本身?
function showConfirmMsg() {
// Code to show the alert box onload
}
【问题讨论】:
标签: javascript jsp servlets onload