标签:
<input type="button" id="print" onclick="printdiv(‘list‘);" value="打印"/>
<script type="text/javascript">
function printdiv(list) {
$("#print_value").val("打印");
$("#info .or").addClass("operation");
$("#container").addClass("container");
//先获取内容
var printData = $("#list").html();
//
var oldstr = document.body.innerHTML;
//
document.body.innerHTML = printData;
//调用浏览器打印
window.print();
//
document.body.innerHTML = oldstr;
return false;
}
</script>
标签:
原文地址:http://www.cnblogs.com/louby/p/4682898.html