152 lines
7.0 KiB
Plaintext
152 lines
7.0 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZTest.aspx.cs" Inherits="VRS.Management.ZTest" %>
|
||
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
|
||
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head runat="server">
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<link href="../Assets/Layui/css/bootstrap.min.css" rel="stylesheet" />
|
||
<link href="../Assets/Layui/css/materialdesignicons.min.css" rel="stylesheet" />
|
||
<link href="../Assets/Layui/css/style.min.css" rel="stylesheet" />
|
||
<link href="../Css/BaseStyle.css" type="text/css" rel="Stylesheet" />
|
||
|
||
<script src="/Scripts/ueditor/ueditor.config.js" type="text/javascript"></script>
|
||
<script src="/Scripts/ueditor/ueditor.all.js" type="text/javascript"></script>
|
||
<title></title>
|
||
</head>
|
||
<body>
|
||
<form id="form1" runat="server">
|
||
|
||
<div>
|
||
<table class="table-form">
|
||
<tr>
|
||
<td class="table-td-name">用户、内容:
|
||
</td>
|
||
<td class="table-td-content"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td class="table-td-name">编辑器:
|
||
</td>
|
||
<td class="table-td-content">
|
||
|
||
<%-- <div id="editor" style="width: 90%; height: 300px;"></div>--%>
|
||
<textarea id="editor" style="width: 90%; height: 300px;">
|
||
|
||
</textarea>
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2"><span value="内容" onclick="gettxt()" style="width: 100px;" >获取</span>
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2">
|
||
<p><img src="/uploads/images/20250425/6388118418259286441597271.png" style="float:right;" title="6.png" alt="6.png"/>hello</p>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td class="table-td-name">内容:</td>
|
||
<td class="table-td-content">
|
||
<%-- <telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Design" Language="zh-CN" Skin="Bootstrap" Width="90%" Height="80px" ImageManager-EnableImageEditor="true">
|
||
<ImageManager ViewPaths="~/Assets/Images,~/Assets/layui/images" UploadPaths="~/Upload/images" />
|
||
<Modules>
|
||
<telerik:EditorModule Visible="true" />
|
||
|
||
</Modules>
|
||
<Tools>
|
||
<telerik:EditorToolGroup Tag="MainToolbar">
|
||
<telerik:EditorTool Name="FindAndReplace" Text="查找和替换" Visible="false" />
|
||
<telerik:EditorSeparator />
|
||
<telerik:EditorSplitButton Name="Undo" Text="撤销">
|
||
</telerik:EditorSplitButton>
|
||
<telerik:EditorSplitButton Name="Redo" Text="重做">
|
||
</telerik:EditorSplitButton>
|
||
<telerik:EditorSeparator />
|
||
<telerik:EditorTool Name="Cut" Text="剪切" />
|
||
<telerik:EditorTool Name="Copy" Text="复制" />
|
||
<telerik:EditorTool Name="Paste" ShortCut="CTRL+V / CMD+V" Text="粘贴" />
|
||
</telerik:EditorToolGroup>
|
||
<telerik:EditorToolGroup Tag="Formatting">
|
||
<telerik:EditorTool Name="Bold" Text="加粗" />
|
||
<telerik:EditorTool Name="Italic" Text="倾斜" />
|
||
<telerik:EditorTool Name="Underline" Text="下划线" />
|
||
<telerik:EditorSeparator />
|
||
<telerik:EditorSplitButton Name="ForeColor" Text="前景色">
|
||
</telerik:EditorSplitButton>
|
||
<telerik:EditorSplitButton Name="BackColor" Text="背景色">
|
||
</telerik:EditorSplitButton>
|
||
<telerik:EditorSeparator />
|
||
<telerik:EditorDropDown Name="FontName" Text="字体">
|
||
</telerik:EditorDropDown>
|
||
<telerik:EditorDropDown Name="RealFontSize" Text="字体大小">
|
||
</telerik:EditorDropDown>
|
||
</telerik:EditorToolGroup>
|
||
</Tools>
|
||
<Content>
|
||
</Content>
|
||
|
||
<TrackChangesSettings CanAcceptTrackChanges="False"></TrackChangesSettings>
|
||
</telerik:RadEditor>--%>
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th class="caption" colspan="2">列表:</th>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2">
|
||
<div id="dataList" class="RadGrid RadGrid_Bootstrap" style="border-color:Transparent;border-width:0px;" tabindex="0">
|
||
<table class="rgMasterTable rgClipCells" style="width:100%;table-layout:fixed;overflow:hidden;empty-cells:show;">
|
||
<thead>
|
||
<tr>
|
||
<th class="rgHeader">姓名</th>
|
||
<th>年龄</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<% List<PersonOM> lstps = VRS.Management.ZTest.GetResult(); %>
|
||
<% foreach (PersonOM ps in lstps)
|
||
{ %>
|
||
<tr class="rgRow">
|
||
<td><%=ps.Name %></td>
|
||
<td><%=ps.Age %></td>
|
||
</tr>
|
||
<%} %>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</form>
|
||
|
||
<script>
|
||
// 初始化 Ueditor 编辑器
|
||
var ue = UE.getEditor('editor');
|
||
|
||
ue.ready(function () {
|
||
//设置编辑器的内容
|
||
ue.setContent('hello');
|
||
//获取html内容,返回: <p>hello</p>
|
||
var html = ue.getContent();
|
||
console.log(html);
|
||
//获取纯文本内容,返回: hello
|
||
var txt = ue.getContentTxt();
|
||
console.log(txt);
|
||
});
|
||
|
||
function gettxt() {
|
||
var html = ue.getContent();
|
||
console.log(html);
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|