jquery wysiwyg 抛出“对象不支持此属性或方法” 回发时
我有一个在其上应用的文本框 jq wysiwyg:
public static void PopulateWysiwyg(this SafeTextBox tb)
{
string script =
@"
jQuery(document).ready(function()
{
jQuery('#safe_text_box').wysiwyg();
});
";
ScriptManager.RegisterStartupScript(
tb,
tb.GetType(),
tb.ClientID + "_wysiwyg",
script.Replace("safe_text_box", tb.ClientID), true
);
}
当我单击表单上的回发按钮时,wysiwyg js 抛出异常:
有帮助吗?
I have a textbox which i applied on it jq wysiwyg:
public static void PopulateWysiwyg(this SafeTextBox tb)
{
string script =
@"
jQuery(document).ready(function()
{
jQuery('#safe_text_box').wysiwyg();
});
";
ScriptManager.RegisterStartupScript(
tb,
tb.GetType(),
tb.ClientID + "_wysiwyg",
script.Replace("safe_text_box", tb.ClientID), true
);
}
When I click a postback button on the form, the wysiwyg js throws an exception:
Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您看到 wysiwyg 插件中注释掉的代码了吗? 重新启用该代码并取出上面的 return 语句。 该代码实现了浏览器感知位,这将使代码在 IE 中工作。
Do you see the bit of code that is commented out in the wysiwyg plugin. Re-enable that bit of code and take out the return statement above it. That code implements the browser-aware bit that will make the code work in IE.
看起来 IE 不支持 contentWindow.document - 我认为代码需要类似于..
It looks like IE doesn't support contentWindow.document - I think that code needs to be something like..