【发布时间】:2017-01-31 09:10:42
【问题描述】:
我的表单上有一个 jhtmlarea 文本区域
textarea id="txtDigital" name="txtDigital" class="form-control" style="background-color:white; resize: vertical !important; "
rows="20" placeholder="Details" runat="server"></textarea>
这是在 javascript 中设置的:
$(document).ready(function () {
$(function () {
$("#<%=this.txtDigital.ClientID%>").htmlarea({
toolbar: [
["bold", "italic", "underline", "strikethrough"],
["increasefontsize", "decreasefontsize", "forecolor"],
["orderedList", "unorderedList", "superscript", "subscript"],
["indent", "outdent", "justifyleft", "justifycenter", "justifyright"]
]
});
});
});
在我添加 ASP.NET UpdatePanel 之前它工作正常 - 文本区域位于更新面板内,当页面加载时,它只是作为纯文本区域加载。我使用 Firebug 单步执行,代码确实运行,但不是在我怀疑 UpdatePanel 刷新之后。删除 updatepanel 允许它按预期加载为 jhtmlarea。
我尝试在显示 textarea 时将相同的代码作为函数调用,并且它的格式正确为 jhtmlarea,但是在我检查页面时无法看到某些内容被禁用。
如果能帮助我使其在 UpdatePanel 中工作,我将不胜感激。
谢谢
【问题讨论】:
标签: javascript jquery asp.net updatepanel jhtmlarea