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;
}
}
精彩评论