Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery CKEditor不在IE11中工作_Jquery_Asp.net_Asp.net Mvc 3_Ckeditor - Fatal编程技术网

Jquery CKEditor不在IE11中工作

Jquery CKEditor不在IE11中工作,jquery,asp.net,asp.net-mvc-3,ckeditor,Jquery,Asp.net,Asp.net Mvc 3,Ckeditor,这是到目前为止我已经实现的代码 <div class="CommentBox" style="display: none;"> <div class="editor-field"> @Html.TextAreaFor(model => model.ObjComment.Description, new { @id = "txtComment", @class = "clsCKEditor" }) </div> </div>

这是到目前为止我已经实现的代码

<div class="CommentBox" style="display: none;">
   <div class="editor-field">
     @Html.TextAreaFor(model => model.ObjComment.Description, new { @id = "txtComment", @class = "clsCKEditor" })
   </div>
</div>
这里,txtComment是我用作编辑器的textarea的id。单击按钮,将生成编辑器,并显示包含此编辑器的div

这在Chrome和Firefox中运行得非常好。但是,IE11中该行的给出错误:

var editor = CKEDITOR.instances[txtComment];**'txtComment' is undefined**

我错过了什么?你能帮我解决这个问题吗。提前感谢。

我在IE11中遇到了一些javascript和Ajax错误,如果将这些错误放在页面的标题部分,您就是在告诉IE11进入兼容模式。这解决了我的问题


您可以删除该行,因为您根本没有使用
编辑器
变量,因此该行是无用的

该行的问题是您试图使用名为
txtcoment
的变量,而不是字符串
“txtcoment”

将txtcoment更改为“txtcoment”。非常感谢。
var editor = CKEDITOR.instances[txtComment];**'txtComment' is undefined**