JavaScript打印函数myPrint(obj): JavaScript打印页面指定div区域原理:使用window.open()在浏览器打开一个新的页面(window), 使用 window.document.write()将指定div区域的内容写入新窗口文档,document.close()关闭文档,使用window.print()调用打印机打印当前文档. function myPrint(obj){ //打开一个新窗口newWindow var newWindow=window.ope…
//对Iframe和图表设置高度 function f() { parent.window.setWinHeight(parent.window.document.getElementById("frame_${queryCategory}")); } var win_height, interval, cnt = 0; function dif() { var cur_height = document.body.offsetHeight; if (cur_height != win…
DIV 背景色设置篇-div背景颜色设置篇 一.div标签内直接设置背景颜色 - TOP <div style="background:#000; color:#FFF">背景为黑色</div> DIV标签内设置背景色为黑色,字体颜色为白色 div标签内设置背景色截图 通过div标签内设置style设置背景色等CSS样式. 二.外部css设置div背景色 - TOP 这里为一个对象CSS命名为".divcss5",通过建立外部…