日期:2014-05-16 浏览次数:20433 次
<head>
<script type="text/javascript">
function EditData() {
UE.getEditor('myEditor').execCommand('cleardoc');
document.getElementById('title').innerText = "<%=GetContect()%>";
UE.getEditor('myEditor').execCommand('insertHtml', $('#HiddenField1').val());
}
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="text" id="title" runat="server"/>
<input type="button" value="编辑" id="edit2" onclick="EditData()" />
<asp:HiddenField ID="HiddenField1" runat="server" />
</form>
</body>
public string GetContect()
{
DbOperate dbo = new DbOperate();
DataSet ds = dbo.Select("2");
string contects = ds.Tables[0].Rows[0][2].ToString();
string title = ds.Tables[0].Rows[0][1].ToString();
contects = dbo.ReplaceCharactor(contects);
HiddenField1.Value = contects;
return title;
}