獲取iframe中body內容
test-id是iframe的ID
window.frames['test-id'].contentWindow.document.body.innerHTML
//簡單示例,在加入富文本編輯器的頁面中獲取中id爲 ueditor_0 的 iframe 標籤中 body 的內容
<input type="button" value="獲取" onclick="alert(window.frames['ueditor_0'].contentWindow.document.body.innerHTML)">
//一個測試地址:http://ueditor.baidu.com/website/onlinedemo.html
//將上述第5行代碼複製到編輯頁面HTML的一個可見位置即可