<html><head></head>
<body><input type=button value=打印 name=btnprint onclick="ifrprint.document.execCommand('Print')">
<iframe src="a.htm" id=ifrprint name=ifrprint style="display:none">
</body>
</html>
<body><input type=button value=打印 name=btnprint onclick="ifrprint.document.execCommand('Print')">
<iframe src="a.htm" id=ifrprint name=ifrprint style="display:none">
</body>
</html>
解决方案 »
- 为什么jquery插件要这么写?哪位帮助解释一下
- 文本框 JQUERY KeyDown事件的问题
- Extjs grid排序报“对象不支持此属性或方法”错误
- JAVAscript运行
- 关于JS,在for循环里使用switch产生的问题(easyui)
- 【高手请进入】利用JavaScript实现动态改变表格列宽
- 以下这段代码,实现一个隐藏行的功能。不过我想知道,在第一行有多个<td> 的情况下,怎样和隐藏行对齐。
- 请教关于如何动态改变对象事件关联的函数
- 如何得到 history.go(-2)中的url?
- 问题讨论:如何让javascript边运行边输出到浏览器,而不是运行完才输出?
- 问题又来了?
- 请问,怎么打印一个框架中的某一个框架页? !!
我测试了你的代码,对"*.htm"或"*.txt"文件都可以,
但对"*.doc" 好象不行!
因为我现在学到的都是一些很基础的。