就是我在ACTION方法中写一个能让他在页面上输出"添加成功","修改成功"这样的对话框,该怎么写。。页面该怎么调用????

解决方案 »

  1.   

    在加载成功的后面加上alert("添加成功")就可以了
      

  2.   

    <%
      if err=0 then
        msg="添加成功!"
      else
        msg="添加失败!原因:"&err.description
      end if
      %><script>alert('<%=msg%>')</script><%%>
      

  3.   

    我这段能写在JAVA代码里吗,你们给我的好象是写在页面上的啊
      

  4.   


    哪了要看你是什么样的架构了?sevlect?
    mvc?
      

  5.   

    MVC结构的啊。我要写在struts的ACTION里,请问该如何写呢???
      

  6.   

    out.print("alert('添加成功')");
    这样就好了