<html:button property="" styleClass="inpMiniButton" onclick="zaohu('<%=page.getAttribute("index")%>');">

解决方案 »

  1.   

    是引号的问题吧
    <html:button property="" styleClass="inpMiniButton" onclick='zaohu(<%=page.getAttribute("index")%>);'>
      

  2.   

    了好用我换成下面的还是不行啊
    <html:button property="" styleClass="inpMiniButton" onclick="alert('<%=pageContext.getAttribute('index')%>');">
      

  3.   

    'alert(<%=pageContext.getAttribute("index")%>);'
    'alert("<%=pageContext.getAttribute("+index+")%>");'
    上面的也不行啊
      

  4.   

    最后我决定还是不用struts的button