开发者

exclude javascript code from print function

I have a print function on a page in my website. the problem is, when it hits this line: <script type="text/javascript" src="http://cdn.powerreviews.com/repos/12564/pr/pwr/engine/js/full.js">开发者_高级运维</script>, it tries to load it, and just never finishes.

Any ideas on how to get around that?


You could use the CSS @media rule for this.

<a class="noprint">foo</a>

and then add a @media print rule to your CSS which hides the elements during print:

@media print {
    .noprint {
        display: none;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜