return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>jquery - Supplementary propertiessettings for JavaScript:window.print() to enable Backgrounds by default - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jquery - Supplementary propertiessettings for JavaScript:window.print() to enable Backgrounds by default - Stack Overflow

programmeradmin3浏览0评论

I would like tot give my Print this Page button a special magical property sothat it automatically enabled the by default unset property (see picture) namely to Do Print the Backgrounds of div colors and bg images etc.

<a href="#" onclick="javascript:window.print()"><? echo __('Print'); ?></a>

Clues, ideas, code, answers or suggestions as answers are all tremmendously wele and I a will appreciate any hints at all for this dream to e true. Thanks in advance.

I would like tot give my Print this Page button a special magical property sothat it automatically enabled the by default unset property (see picture) namely to Do Print the Backgrounds of div colors and bg images etc.

<a href="#" onclick="javascript:window.print()"><? echo __('Print'); ?></a>

Clues, ideas, code, answers or suggestions as answers are all tremmendously wele and I a will appreciate any hints at all for this dream to e true. Thanks in advance.

Share Improve this question asked Mar 21, 2011 at 3:28 SamSam 15.5k25 gold badges96 silver badges153 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

This cannot be done, unfortunately. This is disabled across all browsers by default (unless a user changes it in their settings).

This is not possible . You cannot change the browser settings , if that would be possible people could hack in very easily

You can use something like below

<style>
@media print {
    *{ 
        -webkit-print-color-adjust: exact !important; //for chrome
        Safari color-adjust: exact !important; // For Firefox 
     }
}
</style>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论