*正常打印整个网页只需要window.print();
*指定内容区域打印
var newcont = document.getElementById("printPage").innerHTML;
var oldcont = document.body.innerHTML;
document.body.innerHTML = newcont; //把打印的内容赋值给body
window.print(); //打印指定的内容
document.body.innerHTML = oldcont; //重新给页面赋值
return false;