日期:2014-05-18  浏览次数:20460 次

彈出頁面外觀的控制
C# code

<asp:HyperLinkColumn Text="編輯" Target="_blank" DataNavigateUrlField="WRRDTE" DataNavigateUrlFormatString="edit.aspx?ID={0} "
                            HeaderText="編輯" NavigateUrl="edit.aspx" DataTextFormatString="編輯"></asp:HyperLinkColumn>



彈出頁面外觀的控制,固定大小 沒有狀態欄等 。

------解决方案--------------------
您可以参考一下下面的这条语句:
window.open('需要弹出页面地址', '', 'top=200,left=350,width=300,height=400,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no');
------解决方案--------------------
<asp:HyperLinkColumn Text="編輯" Target="_blank" DataNavigateUrlField="WRRDTE" DataNavigateUrlFormatString="edit.aspx?ID={0} "
HeaderText="編輯" NavigateUrl="edit.aspx" DataTextFormatString="編輯"></asp:HyperLinkColumn>
onclick=window.open(参数列表)

------解决方案--------------------
HTML code


<SCRIPT> 
<!-- 
window.open ('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') 

--> 
</SCRIPT>

------解决方案--------------------
HTML code


<script   language="JavaScript">   
  //to   open   window   in   screen   center   
  function   openWin(url,w,h)   
  {   
          var   px=Math.round((window.screen.availWidth-w)/2);   
          var   py=Math.round((window.screen.availHeight-100-h)/2);   
  var   mywin=window.open(url,"MyWin","toolbar=no,location=no,menubar=no,resizable=no,top="+py+",left="+px+",width="+w+",height="+h+",scrollbar=no");   
  }   
  </script>   
  <input   type="button"   value="打开弹出窗口"   onclick="openWin('123.htm',300,200)">

------解决方案--------------------
C# code
this.Page.RegisterStartupScript("", " <script language='javascript'>window.open('LookAndprint.aspx','newwindow', 'width=1024,height=680,depended=yes,top=0,left= 0, toolbar=no, titlebar=no,  menubar=no,  scrollbars=no,  resizable=no,  location=no,  status=yes'); </script>");

------解决方案--------------------
this.Page.RegisterStartupScript("", " <script language='javascript'>window.open('LookAndprint.aspx','newwindow', 'width=1024,height=680,depended=yes,top=0,left= 0, toolbar=no, titlebar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=yes'); </script>");
弹出一个没有工具栏的网页,里面的参数可以自己删减