0
我使用CodeMirror具有以下功能。CodeMirror使用jQuery導入文本
function app() {
jQuery.get('http://localhost:2748/foo.txt', function (data) {
alert(data);
});
alert(data);
editor.setValue(data);
}
該警報顯示文本文件數據,但是當我將它們分配給編輯器時不顯示。如果我例如我做一個新的變量t = "test";
,然後editor.setValue(t);
然後它的工作。