zoukankan      html  css  js  c++  java
  • OA系统中工作流和表单设计详谈系列2 向编辑器添加html标签

    接下来主要是实现篇,详细解释每个模块的设计细节。

    如何向编辑器添加html标签: 

    现在我向编辑器添加 table 标签:

    我是通过js window.showModalDialog 方法弹出 该页面,返回输入的内容,然后插入编辑器:

    这个就是我们刚刚写的内容。  js 代码如下

      //表格
            $('#Button8').click(function (e) {
                var cValue = parseInt(20000 * Math.random());
                var CID;
                var returnstr = window.showModalDialog('../WorkFlow/Htmls/TableHtml.aspx', 'dialogWidth:150px;DialogHeight=200px;status:no;help:no;resizable:yes;');
                if (returnstr != null) {
                    var htmlstr = "";
    
                    for (var i = 0; i < returnstr.length; i++) {
                        if (i == 0) {
                            CID = "'" + returnstr[i] + "'";
                            htmlstr += '<div><table style="border-1px;border-style:Solid;border-collapse:collapse;"  border="1" id="' + cValue + '"    cellspacing="0" width="80%"   cellpadding="0" align="left">';
                            htmlstr += '<tr>';
                        }
    
                        else {
    
                            htmlstr += '<th align="center">' + returnstr[i] + '</th>';
                        }
                    }
                    htmlstr += '<th align="center" width="10%">操作</th>';
                    htmlstr += '</tr></table>';
                    htmlstr += '<input title="{' + CID + '}" name="inputName3" value="新增" type="hidden" onclick="addTable(' + cValue + ',' + CID + ')"  /></div>';
                    InsertEditor(htmlstr);
    
                }
            });

    我主要的目标是让不知道如何设计工作流的人理解设计的过程,我设计的也是比较简单,技术含量也是不怎么高。

  • 相关阅读:
    455. Assign Cookies
    [leetcode]Linked List Cycle
    *[topcoder]GooseTattarrattatDiv1
    [topcoder]FoxAndChess
    *[topcoder]TheTree
    *[topcoder]LittleElephantAndBalls
    *[topcoder]HexagonalBoard
    *[topcoder]AstronomicalRecords
    *[topcoder]LittleElephantAndIntervalsDiv1
    [topcoder]IncrementAndDoubling
  • 原文地址:https://www.cnblogs.com/EntityFramework/p/3124019.html
Copyright © 2011-2022 走看看