b.jsp

...

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>e6soft.com</title>
    
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="<%=basePath%>web/common/boot.web.miniui.js?c" type="text/javascript"></script>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <style type="text/css">
        .csstable{
            border-collapse: collapse;
            margin-top:10px;
            
            width:98%;
        }
        .csstable tr th{
            padding: 3px;
            _padding-bottom: 4px;
            text-align: right;
            background: #F9F9F9;
            
        }
        .csstable tr td,.csstable tr th{
            padding: 6px;
            border:1px solid #d5d5d5;
            border-collapse: collapse;
            font-weight:400;
        }
    
    </style>


  </head>
  
  <body>
    <div id="layout" class="mini-layout" style="width:100%;height:100%;">
        <div region="center" style="border:0;"> 
            <div id="editForm" style="padding:5px;" >
                 <table class="csstable" style="width:100%;">
                    <tr>
                        <td class="form-label" style="width:100% ;text-align:center" colspan="18">
                            政策法规
                        </td>
                    </tr>
                     <tr>
                         <td colspan="18">
                            <div style="width:100%;">
                                <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
                                    <table style="width:100%;">
                                        <tr>
                                            <td style="width:100%;">
                                                <a class="mini-button" iconCls="icon-add" onclick="addRow()" plain="true" tooltip="增加...">增加</a>
                                                <a class="mini-button" iconCls="icon-remove" onclick="removeRow()" plain="true">删除</a>
                                                <span class="separator"></span>
                                                <a class="mini-button" iconCls="icon-save" onclick="saveData()" plain="true">保存</a>            
                                            </td>
                                        </tr>
                                    </table>           
                                </div>
                            </div>
                            <div id="dataGrid" class="mini-datagrid" style="width:100%;height:700px;" 
                                url="" idField="id" 
                                allowResize="true" pageSize="20" 
                                allowCellEdit="true" allowCellSelect="true" multiSelect="true" 
                                editNextOnEnterKey="true"  editNextRowCell="true">
                                <div property="columns">
                                    <div type="checkcolumn"></div>
                                    <div name="unit" field="unit" headerAlign="center" allowSort="true" width="" >
                                        政策法规
                                        <input property="editor" class="mini-textbox" required="true" style="width:100%;"/>
                                    </div>
                                    <div name="unit" field="unit" headerAlign="center" allowSort="true" width="" >
                                        标题
                                        <input property="editor" class="mini-textbox" required="true" style="width:100%;"/>
                                    </div>
                                    
                                    <div name="result" field="result" headerAlign="center" allowSort="true" width="" >
                                        更多...
                                        <input property="editor" class="mini-textbox" required="true" style="width:100%;"/>
                                    </div>
                                    
                                </div>
                            </div>
                        </td>
                     </tr>
                   </table>
            </div>
        </div>
    </div>
    
    
      <script type="text/javascript">
          mini.parse();
          var grid = mini.get("dataGrid");
        //添加新行
        function addRow() {          
        var newRow = {};
        grid.addRow(newRow, 0);
        //编辑新建行
        grid.beginEditCell(newRow, "name");
        }
        //删除选中行
        function removeRow() {
            var rows = grid.getSelecteds();
            if (rows.length > 0) {
                grid.removeRows(rows, true);                
            }
        }
        //保存数据
        function saveData() {
            saveGrid(grid, {
            url: ""
            });
        }
      </script>
  </body>
</html>

猜你喜欢

转载自www.cnblogs.com/mysterious-killer/p/10366094.html