我想将 PHP 本身生成的所有 CodeMirror 保存在 Blur 上。这就是我所说的:
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 未定义”......怎么做?