日期:2014-05-18  浏览次数:20680 次

action中有一个String类型的test属性,我想在前台用JS alert出来,怎么写?
action中有一个String类型的test属性,我想在前台用JavaScript alert出来,怎么写?


------解决方案--------------------
servlet的话可以将这个request.setAttribute("test", testValue)
jsp中 alert(${test})
struts的话可以
alert('<bean:write  name="yourformname" property="test" />')
或者
alert(${yourformname.test})

have a try