document.writeでのcssの読み込ませ方

masuto様

こんにちは。

アプリ設定に読み込んだCSSでしたら、下記で読むことができそうです。

mySpaceFieldButton2.onclick = function() {
 var swd = window.open("", "_blank","width=540,height=480");
 swd.document.open();
 swd.document.write("<html><head><link rel='stylesheet' href='ここにCSSのパス'></head>");
 swd.document.write("<p>タイトル</p><body id='body01'></body></html>");
}

「ここにCSSのパス」の部分は、デベロッパーツール から取得しました。

Chromeであれば、「Sourcesタブ」からCSSファイル(「download.do?」から始まるものの内の1つ)まで辿り、右クリックで「Copy link address」です。