JavaScriptを使用したスクレイピング、および任意箇所の印刷機能のメモ。HTMLにすでにある特定のタグ間のデータを抽出し、印刷対象に指定します。JavaScriptの実装となり、スクレイピングした範囲をwindowオブジェクトにコピーし、printメソッドを指定。最後に生データを戻すことにより、通常の印刷にも支障のないようにしています。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML lang="ja"> <HEAD> <TITLE>ほげほげ</TITLE> <link href="css/hoge.css" rel="stylesheet" type="text/css"> <script src="js/hoge.js"></script> </HEAD> <BODY> <a onClic