2014-07-03 146 views
0

的documentElement URL是... (url_removed)在更新按鈕 我有功能我無法弄清楚如何讓IFRAME

goruncode(){ 
    editor = ace.edit('editor'); 
    var editorvaluet=editor.getValue(); 
    frames['screen'].document.documentElement.innerHTML = editorvaluet;" 
} 

HTML

I have a <iframe id="screen"></iframe> 

所以當我點擊更新它不更新; t更新

回答

2

使用

document.getElementById("screen").contentDocument.documentElement.innerHTML