据我所知,这段代码应该可以工作,但它没有,我完全被难住了。有什么想法吗?
jQuery
$('.article_chooser').click(function() {
var src = $(this).attr('value');
$("#doc_edits_attributes_0_body").parent("iframe html body").html($("#article"+src).html());
console.log($("#doc_edits_attributes_0_body").parent("iframe html body").html());
});
HTML
<textarea class="editable_areas" cols="40" id="doc_edits_attributes_0_body" name="doc[edits_attributes][0][body]" rows="20" style="display: none;"></textarea>
<iframe class="wysihtml5-sandbox" security="restricted" allowtransparency="true" frameborder="0" width="0" height="0" marginwidth="0" marginheight="0">
<html>
<body marginwidth="0" marginheight="0" contenteditable="true" class="editable_areas wysihtml5-editor" spellcheck="true">
</body>
</html>
</iframe>
干杯!