Print
only?

前端 未结 30 2220
暖寄归人
暖寄归人 2020-11-22 00:25

How do I print the indicated div (without manually disabling all other content on the page)?

I want to avoid a new preview dialog, so creating a new window with this

30条回答
  •  佛祖请我去吃肉
    2020-11-22 00:29

    With jQuery it's as simple as this:

    w=window.open();
    w.document.write($('.report_left_inner').html());
    w.print();
    w.close();
    

提交回复
热议问题