对GridView的行加颜色并弹出Kindeditor的实现思路
2024-07-10 12:45:57
供稿:网友
前台代码:
代码如下:
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript">
function tureDelete() {
if (confirm('真的要删除吗?') == false)
{ return false;}
}
function showdiv()
{
document.getElementByIdx_x("show1").style.display = "block";
document.getElementByIdx_x("showDiv").style.display = "block";
}
</script>
<link rel="stylesheet" href="Kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="Kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="Kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="Kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="Kindeditor/plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function (K) {
var editor1 = K.create('#content1', {
cssPath: 'Kindeditor/plugins/code/prettify.css',
uploadJson: 'Kindeditor/asp.net/upload_json.ashx',
fileManagerJson: 'Kindeditor/asp.net/file_manager_json.ashx',
allowFileManager: true,
afterCreate: function () {
var self = this;
K.ctrl(document, 13, function () {
self.sync();
K('form[name=example]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function () {
self.sync();
K('form[name=example]')[0].submit();
});
}
});
prettyPrint();
});
</script>
<style type="text/css">
#showDiv {
position:absolute;
top:50%;
left:50%;
margin-left:-350px;
margin-top:-250px;
}
</style>
</head>
<body>
<asp:Label ID="Label1" runat="server" Visible="false" Text=""></asp:Label>
<form id="form1" runat="server">
<div id="show1" style="display:none;background-color: Black;position:absolute; width:100%;height:100%;top:0px;left:0px; opacity:0.3;"></div>
<div id="showDiv" style="display:none;background-color:bisque;">
<table>
<tr>
<td>
标题
</td>
<td>
<asp:TextBox ID="txtTitle" runat="server" Width="250px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
内容
</td>
<td>
<textarea id="content1" cols="100" rows="8" style="width:700px;height:500px;visibility:hidden;" runat="server"></textarea>
</td>
</tr>
<tr>
<td>
类别
</td>
<td>
<asp:DropDownList ID="ddlClassName" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
用户
</td>
<td>
<asp:DropDownList ID="ddlUser" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="btnUpdate" runat="server" Text="保存" />