现在,当我输入此内容时,编辑器下方有预览。我想做类似的事情。堆栈溢出如何做到这一点?
问问题
222 次
2 回答
8
于 2009-09-25T14:11:51.517 回答
1
$(function(){
// whenever the text in the editor box changes:
$("#editorTextArea").change(function(){
// add the text to the preview box below
// this certainly involves some formatting/marking up of the text
// but this is good enough for illustrative purposes
$("#previewBox").val(this.value);
});
});
于 2009-09-25T14:12:59.477 回答