页面大小问题高度宽度 [英] page size problem height width

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

问题描述

嗨所有,

i有设计页面,在同一页面上onbuttonclick我称之为javascript下面写的函数

window.open(popurl,_Self,height = 350px,宽度= 550px,screenX = 50,左= 150,screenY = 150,top = 50,status = no,scrollbars = yes);

这个工作正常,在同一个窗口打开。在这个新窗口中我有按钮当我点击按钮我重定向到新页面说Response.redirect(demo.aspx);但是打开它时需要使用前一页的相同内容,即页面尺寸看起来很小。



请做必要的解决方案。



谢谢

hi All,
i have design page, in same page Onbuttonclick i called function written in javascript below line
window.open(popurl, "_Self", "height=350px,width=550px,screenX=50,left=150,screenY=150,top=50,status=no,scrollbars=yes");
this is working fine and opening in same windows. in this new window i have button when i click on button i redirect into new page say Response.redirect ("demo.aspx"); but while opening it take same propety of previous page i.e page size look small.

kindly do needfull solution.

Thanks

推荐答案

打开一个具有特定大小(高度,宽度)的新窗口,然后下一次显示在该页面上的所有页面,大小将相同(最后调整大小)。这是Web浏览器的默认行为。如果您想再次恢复到完整尺寸,则需要调整大小。 Javascript方法



Once a new window is opened with a specific size(height,width) then next time all pages which are display on that page, size will be same(last resized size). This is default behavior of web browser. If you want to back to full size again you need to resize that. Javascript method

window.resizeTo(width, height);





将调整页面大小。假设您想要完整大小的demo.aspx页面。然后你应该在demo.aspx页面的window.onload方法上写下面的javascirt。





will be resize the page. Suppose you want full size of page demo.aspx. Then you should write the following javascirt on window.onload method of that demo.aspx page.

<script type="text/javascript">
        window.onload = function () {
            var width=1200;
            var height = 1200;
            window.resizeTo(width, height);
        };
   </script>





它会根据指定重新调整浏览器的大小。你需要调整宽度和高度值。



It will re-size the browser as specified. You need to adjust the width and height value.


你好,



我已经解决了我的自我。

见下文

Response.Write(< script language =''javascript''> window.open(''+ Convert.ToString(ViewState [PageName])+ '',''_目标'');< / script>);
Hi,

I have resolve my self.
see below
Response.Write("<script language=''javascript''> window.open(''" + Convert.ToString(ViewState["PageName"]) + "'', ''_Target'');</script>");


这篇关于页面大小问题高度宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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