javascript印刷)の内容機能の方法例

980 ワード

 
  
     

 

    </p> <p>var global_Html = "";    </p> <p>function printme() {</p> <p>        global_Html = document.body.innerHTML;        </p> <p>      document.body.innerHTML = document.getElementById('divPrint').innerHTML;                             </p> <p>       window.print();</p> <p>        window.setTimeout(function () {</p> <p>            document.body.innerHTML = global_Html;        </p> <p>}, 1500);    </p> <p>}</p> <p>