我在一个页面里想把每一行的id通过一个按钮打开一个新窗体传过去,而这个id是通过bean<bean:write name="row" property="assignTo"/>得到的,
<html:button property="confirm" onclick="open('templateSelectAction.do?bugId=<bean:write name="row" property="assignTo"/>','newwindow','status:yes;resizable:yes;help:no;dialogHeight: 700px; dialogWidth: 600px")"><bean:message key="button.bugoutput"/></html:button>
但是总是在第一个页面里报错,因为onclick="open('templateSelectAction.do?bugId=<bean:write name="row" property="assignTo"/>','newwindow','status:yes;resizable:yes;help:no;dialogHeight: 700px; dialogWidth: 600px")"> 有错误的?有人告诉我怎么传吗?谢谢大家了!

解决方案 »

  1.   

    好像onclick事件里面的引号不匹配,改成下面试试onclick=
    "open('templateSelectAction.do?bugId=<bean:write name="row" property="assignTo"/>','newwindow',
    'status:yes;resizable:yes;help:no;dialogHeight: 700px; dialogWidth: 600px')"
      

  2.   

    onclick里面好像不支持beanonclick="open('templateSelectAction.do?bugId="+<bean:write name='row' property='assignTo'/>+"','newwindow','status:yes;resizable:yes;help:no;dialogHeight: 700px; dialogWidth: 600px")"> 这样试试看 主要 <bean:write name='row' property='assignTo'/>不能直接写在里面