一个页面,有打印按钮 当点击按钮的时候 我想弹出新的页面 新的页面只是原来页面的某一部分,且弹出的页面的css是自己定义的? 谢谢
解决方案 »
- 请问ie6下报错Internet Explorer cannot open the Internet site怎样解决
- js 动态创建表格,并给表格添加onclick事件
- javascript里面如果保留HTML标签,只替换文本的正则表达式,请高手帮忙谢谢!
- document.form1.cb[i].checked 变量问题一直没搞明白!
- 怎样取得select下选中的option的id....
- javascript取得session问题
- 怎样的动态的添加表格的新行新列用脚本?
- 求一个思路,请高手帮帮忙
- showModelessDialog最低的支持版本是多少?
- 请问如何控制运算过程中的数字精度?救急!!!
- 100分请高手指教关于点击按钮页面循环显示的实现
- 代码不兼容FF,帮忙
谢谢了
function print(){
document.myform.action="";//新页面地址路径
document.myform.target="_blank";//页面弹出方式
document.myform.submit();
}<form METHOD="POST" name="myform" action="">
<input type="button" value="打印" onclick="print()">
</form>
function print(){
document.myform.action="";//新页面地址路径
document.myform.target="_blank";//页面弹出方式
document.myform.submit();
}<form METHOD="POST" name="myform" action="">
<input type="button" value="打印" onclick="print()">
</form>
var newwin = window.open('');//打开新的页面
newwin.print();//打印
弹出的页面没有弹出打印控制呢
oWin.print();就是这样啊
var oWin = window.open('http://baidu.com', 'printwindow', 'menubar=no,location=no,resizable=yes,scrollbars=no,status=no,width=400,height=300');
oWin.print(); 你看看错误在那里
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript">
function print(){
var oWin = window.open('http://baidu.com', 'printwindow');
oWin.print();
document.myform.target="_blank";//页面弹出方式
document.myform.submit();
}
</script>
</head>
<body>
<form METHOD="POST" name="myform" action="">
<input type="button" value="打印" onclick="print()">
</form>
</body>
</html>
这是我机器的代码.您看看
var oWin = window.open( 'http://baidu.com ', 'printwindow '); //这里弹出的应该是.jsp页面
oWin.print();
document.myform.target= "_blank ";//不要了
document.myform.submit(); //不要了
}