WebUI/AchieveManageWeb/Views/News/NewsAdd.cshtml

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>添加公告</title>
    <link href="~/Scripts/jquery-easyui-1.4.4/themes/bootstrap/easyui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-easyui-1.4.4/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/js/common.js"></script>
    <link href="~/Content/themes/table.css" rel="stylesheet" />
    <script src="~/kindeditor-4.1.3/kindeditor.js"></script>
    <script src="~/kindeditor-4.1.3/lang/zh_CN.js"></script>
    <script src="~/kindeditor-4.1.3/plugins/code/prettify.js"></script>
    @*<script src="~/Scripts/lhgdialog/lhgdialog/lhgdialog.js?self=true&skin=discuz"></script>*@

    <script type="text/javascript">
        KindEditor.ready(function (K) {
            //实现显示富文本的代码,第一个方法,实现添加的框架
            window.editorAdd = K.create('#txtMainContent', {
                cssPath: '~/kindeditor-4.1.3/plugins/code/prettify.css',
                uploadJson: '../upload_json.ashx',
                fileManagerJson: '../file_manager_json.ashx',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {//添加保存信息的组合键ctrl+z
                        self.sync();//同步富文本编辑器里的内容到textarea中去
                        K('form[name="txtMainContent"]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name="txtMainContent"]')[0].submit();
                    });
                }
            });
            prettyPrint();

            //获取添加文本框内容
            function getEditorAddData() {
                return editorAdd.html();     //使用上面定义的window.editorAdd的方法的HTML代码
            }

            $("#btnAdd").click(function () {
                $("#NewsAddForm").form("submit", {
                    url: "/News/AddNews",
                    onSubmit: function (param) {
                        param.FTitle = $("#txtFTitle").val();
                        param.FTypeId = $("#comboxtype").combobox('getValues').toString();
                        param.FContent = getEditorAddData();
                        if ($(this).form('validate')) {
                            return true;
                        }
                        else {
后面还有 68 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。