如何弹处一个对话框,然后点击确定后打印当前页面呀‘》?在线等待 <a onClick="if(confirm('你确定要打印吗?')) window.print();">打印</a> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <head><title>打印确认</title><style media="print">.noprint { display: none }</style></head><body><object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object><script defer>function window.onload() { factory.printing.header = "自定义页头" factory.printing.footer = "数码在线" factory.printing.portrait = false idPrint1.disabled = false; // enable UI button idPrint2.disabled = false; idPrint3.disabled = false; idPrint4.disabled = false; factory.printing.leftMargin = 0.75 factory.printing.topMargin = 1.5 factory.printing.rightMargin = 0.75 factory.printing.bottomMargin = 1.5 }</script><script>function printalert(){ if(confirm("确定要打印吗")) factory.printing.Print(false); }</script><div class=noprint> <input id="idPrint1" type="button" value="打印本页" onclick="printalert()"> <input id="idPrint2" type="button" value="页面设置" onclick="factory.printing.PageSetup()"> <input id="idPrint3" type="button" value="打印预览" onclick="factory.printing.Preview()"> <input id="idPrint4" type="button" onclick="window.close()" value="关闭窗口"></div><br><table width="720" border="0" cellspacing="0" cellpadding="0" align="center" > <tr> <td width="500" bgcolor="#0099ff"> 这里是你要打印的内容,上面的按钮不会被打印出来<br> 如果你有什么内容不想打印,用将其样式定义为noprint即可 </td></tr></table></body> 采集网页上的图片 【囧】=====图片预览 发不到iis就不行了,直接双击打开可以===== 怎么样得到一个表格的宽度? 用DOM的形式创建表,为什么不行啊?请指教 请教大虾,急~~~ 刚学习Ext4.0,感觉写的也没有差错,为何在浏览器中不显示任何东西呢?求大牛指点迷津... 网页中鼠标滑动时连续不断的出现一些小图片,用JavaScript javascript 求一个简单正则表达式。 关于提取URL主机名字问题 yahoo/hotmail改良版HTML编辑器 请问javascript中怎么实现时间对象自动加一秒,有没有一个函数。在线等待!!急!!
<title>打印确认</title>
<style media="print">
.noprint { display: none }
</style>
</head>
<body>
<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object>
<script defer>
function window.onload() {
factory.printing.header = "自定义页头"
factory.printing.footer = "数码在线"
factory.printing.portrait = false
idPrint1.disabled = false; // enable UI button
idPrint2.disabled = false;
idPrint3.disabled = false;
idPrint4.disabled = false;
factory.printing.leftMargin = 0.75
factory.printing.topMargin = 1.5
factory.printing.rightMargin = 0.75
factory.printing.bottomMargin = 1.5
}
</script>
<script>
function printalert()
{
if(confirm("确定要打印吗"))
factory.printing.Print(false);
}
</script>
<div class=noprint>
<input id="idPrint1" type="button" value="打印本页"
onclick="printalert()">
<input id="idPrint2" type="button" value="页面设置"
onclick="factory.printing.PageSetup()">
<input id="idPrint3" type="button" value="打印预览"
onclick="factory.printing.Preview()">
<input id="idPrint4" type="button"
onclick="window.close()" value="关闭窗口">
</div>
<br>
<table width="720" border="0" cellspacing="0" cellpadding="0" align="center" >
<tr>
<td width="500" bgcolor="#0099ff">
这里是你要打印的内容,上面的按钮不会被打印出来<br>
如果你有什么内容不想打印,用将其样式定义为noprint即可
</td>
</tr></table></body>