CodeMirror 将自身保存在Blur 上
我想在Blur上保存PHP本身生成的所有CodeMirror。这就是我要说的:
while ($db_field = mysql_fetch_assoc($result)) {
...
var editor = CodeMirror.fromTextArea(document.getElementById("id'.$db_field['id'].'"), {
lineNumbers: true,
matchBrackets: true,
mode: "application/x-httpd-php",
onBlur: id'.$db_field['id'].'.save()
});
...
}
但它不起作用... FireBug 说:“id1 未定义”...该怎么做?
I want to save all CodeMirrors generated by PHP itself onBlur. Here is what I am talking about:
while ($db_field = mysql_fetch_assoc($result)) {
...
var editor = CodeMirror.fromTextArea(document.getElementById("id'.$db_field['id'].'"), {
lineNumbers: true,
matchBrackets: true,
mode: "application/x-httpd-php",
onBlur: id'.$db_field['id'].'.save()
});
...
}
But it don´t work ... FireBug says: "id1 is not defined" ... how to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在代码中发现了错误:
这就像一个魅力
I found bug in my code:
This works like a charm