zoukankan      html  css  js  c++  java
  • 向自己的页面提交

    <%@ page contentType="text/html; charset=gb2312" language="java" %>
    <%@ page import="com.sgai.suvery.model.SuverySubject" %>
    <%@ page import="com.sgai.suvery.dao.SuverySubjectDao" %>
    <%@ page import="com.sgai.framework.sql.DbOperator" %>
    <%@ include file="../permission/permission.jsp" %>
    <%@ include file="../permission/permission_ survey.jsp" %>
    <html>
    <script type="text/javascript">
    </script>
    <head>
        <link rel="stylesheet" href="../css/Admin_STYLE.CSS">
        <link rel="stylesheet" href="../css/style2.css">
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <style type="text/css">
            <!--
            .style3 {
                color: #FFFFFF;
                font-weight: bold;
            }

            -->
        </style>
    </head>
    <%
        String leibie = request.getParameter("leibie");    
        if(leibie == null){
    %>
    <form action="editstate.jsp">
        <input type="hidden" name="leibie" value="1">
        <body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
        <table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
            <tr align="right">
                <td height=25 class="topbg">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" align=center>
                        <tr>
                            <td align="right">
                                <div align="center" class="style3">修 改 发 布 状 态</div>
                                <div align="center"></div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <%
            String myid = request.getParameter("id");
            String Tflag = "0";
            String Ts_type = "0";
            SuverySubjectDao SuverysubjectDaoobj = new SuverySubjectDao();
            if (myid != null) {
                SuverySubject SuverySubjectobj = SuverysubjectDaoobj.loadByID(myid);            
                Tflag = SuverySubjectobj.getFlag();
            }
        %>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="border">
            <tr class="tdbg">
                <td align="right">是否发布</td>
                <td><select name="flag">
                    <option  <%if (Tflag != null && Tflag.equals("0")) {%> selected<%}%> value="0">未发布</option>
                    <option  <%if (Tflag != null && Tflag.equals("1")) {%> selected<%}%> value="1">发布</option>
                </select></td>
            </tr>
            <tr class="tdbg">
        </table>
        <table width="100%" border="0" align="center">
            <td colspan="2" align="center">
                <tr class="tdbg" align="center">
                    <input type="hidden" name="flag">
                    <input type="hidden" name="myid" value="<%=myid%>">
                    <input name="button" type="Submit" class="buttona" value="确定">
                </tr>
            </td>
        </table>
        </body>
    </form>
    <%
        }
        else {
            String myid = request.getParameter("myid");
            String flag = request.getParameter("flag");
            boolean Uflag = false;
            String updatesql = "update INNE_SUVERY_SUBJECT set flag=" + flag + "where id=" + myid;
            if (myid != null && flag != null) {
                DbOperator.executeUpdate(updatesql);
                Uflag = true;
            }
            if (Uflag == true) {
                out.println("<script language='javascript'>alert('修改成功!');self.opener.location.reload();window.close();</script>");
            } else {
                out.println("<script language='javascript'>alert('修改失败!');window.opener = null;window.close();</script>");
            }
        }
    %>
    </html>
     

  • 相关阅读:
    jquery的$.与$.fn的区别
    jquery加载页面的方法
    创业股权究竟如何分配--新浪创业训练营
    创业者要处理好的10大关系
    洪泰基金投资经理殷鹏:肯定不投的八类项目
    创业初期股权如何分配-------陈楠心血总结
    排序总结
    如何快速进入一门领域,学习新的知识
    虚拟机的设置
    华为大数据项目fusionInsight
  • 原文地址:https://www.cnblogs.com/encounter/p/2189282.html
Copyright © 2011-2022 走看看