如何在不同的文件中存储一个文件夹以及如何在新窗口中显示文件 [英] How To One Folder I Stored In Different Files And How To Files Display In New Window
本文介绍了如何在不同的文件中存储一个文件夹以及如何在新窗口中显示文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
功能弹出窗口(报告){
newwindow = window.open(" Report /" + RestaurantId +" - " + Period +" .pdf",'',' height = 400,width = 500');
if(window.focus){newwindow.focus()}
返回false;
}
此代码不起作用
解决方案
试试这样。 。
< html xmlns = http://www.w3.org/1999/xhtml >
< span class =code-keyword>< head runat = server>
< title > < / title >
< script < span class =code-attribute> type = text / javascript >
函数弹出窗口(RestaurantId,Period){
newwindow = window.open( Report /+ RestaurantId + - + Period +。pdf,'','height = 400,width = 500');
if(window.focus){newwindow.focus()}
}
< / script >
< / head >
< 正文 >
< 表格 id = form1 runat = server >
< div >
< asp:按钮 ID = btn runat = server OnClientClick = popup('101010','4am');返回false / >
< / div >
< / form >
< / body >
< / html > 跨度>
function popup(Report) {
newwindow = window.open("Report/" + RestaurantId + "-" + Period + ".pdf" , '', 'height=400,width=500');
if (window.focus) { newwindow.focus() }
return false;
}
this code not working
解决方案
try like this..
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> function popup(RestaurantId, Period) { newwindow = window.open("Report/" + RestaurantId + "-" + Period + ".pdf", '', 'height=400,width=500'); if (window.focus) { newwindow.focus() } } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="btn" runat="server" OnClientClick="popup('101010','4am'); return false" /> </div> </form> </body> </html>
这篇关于如何在不同的文件中存储一个文件夹以及如何在新窗口中显示文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文