function initIframe(){ document.getElementById("xyz").src="parent.sourceCode()";}function sourceCode(){ var s = "<html><head>"; s += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">"; s += "</head></body>Hello!</body></html>"; return s;}...<iframe id="xyz" width="100%" height="200"></iframe>
function sourceCode(){ var s = "<html><head>"; s += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">"; s += "</head></body>Hello!</body></html>"; return s;}...
<iframe id="xyz" width="100%" height="200"></iframe>
Проблема только в кодировках. Похоже, что браузер по умолчанию использует кодировку