要不是你那个print控件脚本代码不对,要不是你的浏览器禁止运行脚本了。你打开工具-Internet选项-高级,看看里面的选项有没有禁止运行脚本。
如果是自己做网页,网页打印控件的脚本如下:
htmlheadtitlejavascript打印-打印页面设置-打印预览代码/title
meta http-equiv=content-type content=text/html; charset=gb2312 /
script language=javascript
function printsetup(){
// 打印页面设置
(8,1);
}
function printpreview(){
// 打印页面预览
(7,1);
}
function printit()
{
if (confirm('确定打印吗?')) {
(6,6)
}
}
/script
/head
body
div align=center
object id=wb height=0 width=0
classid=clsid:8856f961-340a-11d0-a96b-00c04fd705a2 name=wb/object
input οnclick=javascript:printit() type=button value=打印 name=button_print /
input οnclick=javascript:printsetup(); type=button value=打印页面设置 name=button_setup /
input οnclick=javascript:printpreview(); type=button value=打印预览 name=button_show /
/div
/body
/html
取消
评论