请问在打印之前隐蔽一个对象是怎样完成? 设置对象的style="display:none"就行了. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 但我要的是在打印前设定,平时要正常工作的,我问的是下载打印页面前是用那种属性,我用了onunload事件不行,好像是否有onbeforeprint事件,但我查了Dhtml.chm帮助,没有,请指教! <script>function hid(){ if (document.all.b.style.display=='none') document.all.b.style.display = 'block' ; else document.all.b.style.display = 'none' ;}</script><input type=button name=b style="display:block" value=button><input type=button name=b1 value=button1 onclick=hid()> document.all.b.style.display = 'none' ;//隐藏window.print();//打印document.all.b.style.display = 'block' ;//显示 当然有onbeforeprint和onafterprint事件了!自己好好看看!msdn上有!还有楼上的那种方法很搞笑呀!print是异步的! httpconnection post 传参数 中文 javaweb开发的BBS系统在发表帖子的也面出现这样的错误 求教 tomcat+MyEclipse开启问题 如何仅仅通过SQL语句实现顶帖子的效果?? 请问JAVA中数据库读取的问题 如果url中的变量名和表单名称冲突,请问如何让JSP从表单中取值? 调查 tomcat启动的问题,急求~~~ 我已经调一天了,求大家帮忙啊!!!! 在action中如何得到pagecontext?再线等 web开发的初学者请进来 如何通过Servlet发送image/gif图象 在线请教:如果在JSP页面中上载文件到服务器端?
function hid(){
if (document.all.b.style.display=='none')
document.all.b.style.display = 'block' ;
else
document.all.b.style.display = 'none' ;
}
</script>
<input type=button name=b style="display:block" value=button>
<input type=button name=b1 value=button1 onclick=hid()>
window.print();//打印
document.all.b.style.display = 'block' ;//显示