使用javasript打印页面 [英] print page using javasript

查看:89
本文介绍了使用javasript打印页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为打印页面写了javascript。



 function printpage()
{
window.print( );
}





在onclientclick按钮属性中,我已将函数名称printpage()。

这在visual studio 2008中有效,但在visual studio 2010中没有。

什么是解决方案?

解决方案

Web应用程序中JavaScript的功能原则上不依赖于Visual Studio 。 HTTP服务器从不使用任何类型的Visual Studio,根本不是任何意义上的。问题只是毫无意义。我确实理解你有一些问题,但是你需要从你的(错误的或正确的)想法中获得纯粹的观察结果。然后你需要以客观的方式展示这些观察结果。



-SA


 Response.Write( < script> window.print();< / script> ); 


i have write javascript for print page.

function printpage()
{
window.print();
}



In onclientclick button property ,i have put function name printpage().
this is working in visual studio 2008,but not in visual studio 2010.
what is solution for that?

解决方案

The function of the JavaScript in a Web application does not depend on Visual Studio in principle. An HTTP server never uses any kind of Visual Studio, not in any sense at all. The question just makes no sense. I do understand that you have some problem, but you need to obtain pure observations free from your (wrong or right) ideas on what''s going on. And then you need to present those observation in objective manner.

—SA


Response.Write("<script>window.print();</script>");


这篇关于使用javasript打印页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆