zoukankan      html  css  js  c++  java
  • Window.open()打开一个窗体不被拦截

     1 在DataGrid中建一个模板列,在模板列中放一个客户端的Button,或者直接写你要的字句,然后用<href>连接
     2 例:
     3 <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
     4     <TR>
     5      <TD width="100%">
     6       <asp:datagrid id="dgFreightInfo" runat="server" Width="96%" GridLines="Horizontal" AllowCustomPaging="True"
     7        AllowPaging="True" AutoGenerateColumns="False" DataKeyField="id" BorderColor="White" BorderWidth="1px"
     8        PageSize="20">
     9        <ItemStyle Height="25px" BackColor="#F7F7F7"></ItemStyle>
    10        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="25px" BackColor="#E8E8E8"></HeaderStyle>
    11        <Columns>
    12         <asp:TemplateColumn>
    13          <ItemTemplate>
    14           <href='javascript:onclick=LoadFreight(<%# DataBinder.Eval(Container,"DataItem.id")%>)'>
    15            详细信息</A>
    16          </ItemTemplate>
    17         </asp:TemplateColumn>
    18        </Columns>
    19       </asp:datagrid>
    20      </TD>
    21     </TR>
    22 然后写一个JavaScript方法
    23 <script language="javascript">
    24 function LoadFreight(id)//id为传进的参数
    25 {
    26  var url='url.aspx?tid='+id+'';
    27  window.open(url,'','scrollbars=yes,top=0,left=0,resizable=no,status=no,toolbar=no,menubar=no,location=no,width=430,height=600');
    28 }
    29 </script>

  • 相关阅读:
    初识Tensorboard
    sql优化的几种方法
    nginx+ffmpeg+jwplayer
    jwplayer播放器
    详解spring 每个jar的作用
    RabbitMQ安装
    Migration 使用方法
    VisualSVN server 启用日志编辑
    nodejs prefix(全局)和cache(缓存)windows下设置
    python3 eval字符串str 转字典dict
  • 原文地址:https://www.cnblogs.com/feb9903/p/709345.html
Copyright © 2011-2022 走看看