Michael Mahemof 씨가 HTML을 iframe에 넣고 추출하는 방법에 대해 작성하셨습니다. 원래 TiddlyWiki를 많이 사용하시는 분인데, 소스를 보다가 알게된 방법이라고 합니다. 이것은 그런 일을 하는데에 브라우저 파서를 사용할 수 있게 해줍니다:
from Introducing HTML into an iframe and getting it back
[code:js]
// put it in
var doc = iframe.document;
if (iframe.contentDocument)
doc = iframe.contentDocument; // For NS6
else if(iframe.contentWindow)
doc = iframe.contentWindow.document; // For IE5.5 and IE6
// Put the content in the iframe
doc.open();
doc.writeln(content);
doc.close();
// and then get it out
var storeArea = doc.getElementById("storeArea");
// put it in
var doc = iframe.document;
if (iframe.contentDocument)
doc = iframe.contentDocument; // For NS6
else if(iframe.contentWindow)
doc = iframe.contentWindow.document; // For IE5.5 and IE6
// Put the content in the iframe
doc.open();
doc.writeln(content);
doc.close();
// and then get it out
var storeArea = doc.getElementById("storeArea");
from Introducing HTML into an iframe and getting it back
'[IT] Web Tech' 카테고리의 다른 글
iPhone에서의 3D CSS 변환 (0) | 2008.09.09 |
---|---|
mtjs_iepnghandler: IE 6 를 위한 더 나은 PNG 지원 (3) | 2008.08.13 |
img2json: App Engine을 통해 이미지의 메타데이터를 얻다 (0) | 2008.08.13 |
예제로 보는 iPhone Safari 손가락 탐색 (0) | 2008.08.07 |
HTML을 iframe에 넣는 방법 (0) | 2008.08.07 |
Ext 2.2: History, Selectors, FileUploader 그 밖의 것들 (0) | 2008.08.07 |
MooTools 1.2 이미지 보호장치 (2) | 2008.08.07 |
SEO와 RIA가 Flash 인덱싱으로 가까워지다 (0) | 2008.07.19 |
GWT를 이용한 무한 Web 2.0 이미지 (0) | 2008.07.19 |
댓글을 달아 주세요