Window.open()打开一个窗体不被拦截
Window.open()打开一个窗体不被拦截
例:
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
<TR>
<TD width="100%">
<asp:datagrid id="dgFreightInfo" runat="server" Width="96%" GridLines="Horizontal" AllowCustomPaging="True"
AllowPaging="True" AutoGenerateColumns="False" DataKeyField="id" BorderColor="White" BorderWidth="1px"
PageSize="20">
<ItemStyle Height="25px" BackColor="#F7F7F7"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="25px" BackColor="#E8E8E8"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<A href='javascript:onclick=LoadFreight(<%# DataBinder.Eval(Container,"DataItem.id")%>)'>
详细信息</A>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
</TD>
</TR>
然后写一个JavaScript方法
<script language="javascript">
function LoadFreight(id)//id为传进的参数
{
var url='url.aspx?tid='+id+'';
window.open(url,'','scrollbars=yes,top=0,left=0,resizable=no,status=no,toolbar=no,menubar=no,location=no,width=430,height=600');
}
</script>
Window.open()打开一个窗体不被拦截的更多相关文章
- window.open打开新窗口被浏览器拦截的处理方法
一般我们在打开页面的时候, 最常用的就是用<a>标签,如果是新窗口打开就价格target="_blank"属性就可以了, 如果只是刷新当前页面就用window.loca ...
- ajax回调打开新窗体防止浏览器拦截有效方法
ajax回调打开新窗体防止浏览器拦截,就这么做! 问题剖析: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 function click_fun(){ window ...
- winform 打开一个窗体,关闭一个窗体
例如 我要打开一个窗体b,关闭一个窗体a a中的代码添加: private void pictureBox5_Click(object sender, EventArgs e) { W_MainFo ...
- modalDialog的使用,图片切换,点击图片时打开一个窗体,并显示信息
//主窗体 //与open的区别:1.参数二是传递的参数 2.属性设置格式:属性=属性值; 3.dialogHeight与dialogWidth没有单位,即需要自己加上px //window.show ...
- window.open 打开子窗体,关闭全部的子窗体
需求:通过window.open方法打开了子窗体,当关闭主窗体时.子窗体应当也关闭. 实现思路: 1.打开子窗体函数window.open(url,winName)的第二个參数winName能够唯一标 ...
- WinFrom打开一个窗体关闭另一个窗体
在写Winform程序的时候,经常会遇到“打开一个新的窗体然后关闭本窗体”之类的问题.最常见的就是登陆界面和主窗体了.而最常见的处理方法就是表单判断正确后 new MainForm().Show(); ...
- WinFrom - 打开一个窗体关闭另一个窗体
在写Winform程序的时候,经常会遇到“打开一个新的窗体然后关闭本窗体”之类的问题.最常见的就是登陆界面和主窗体了.而最常见的处理方法就是表单判断正确后 new MainForm().Show(); ...
- 使用window.open打开新窗口被浏览器拦截的解决方案
问题描述: 代码中直接使用window.open('//www.baidu.com', '_blank');会被浏览器窗口拦截 原因浏览器为了维护用户安全和体验,在JS中直接使用window.open ...
- js window.open 打开新窗体 参数设置
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
随机推荐
- Java_Web三大框架之Hibernate 入门(一)
一.Hibernate简介: Hibernate作者——Gavin King Hibernate创始人 < Hibernate in action >作者 EJB 3.0的Entity b ...
- Detectron-MaskRCnn: 用于抠图的FCNN
市面上暂时还没有找到可以在消费机显卡上实时运行的MaskRCnn,TensorFlow即使是C++版本训练在coco数据集上的模型也是慢的要死,最后不堪忍受,只能放弃. 经历了一些列fuckingDo ...
- Lazarus Coolbar and AnchroDocking
在lazarus1.6里加载了AnchroDocking后,Coolbar突然不见了,找了好久没找到,原来在这里! 在AnchroDocking中可能是为了界面的最大化,默认是开始Toolbar 而关 ...
- wpf绑定静态变量,模拟rem单位
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; usin ...
- CAD插入图块前修改图块文字
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...
- Java中Math对象的属性与方法
Math.sqrt() ——————>计算平方根Math.cbrt()————————>计算立方根Math.pow(a, b)——————————>计算a的b次方Math.max( ...
- Ansible 利用playbook批量部署Nginx
我这里直接部署的,环境已经搭建好,如果不知道的小伙伴可以看上一遍ansible搭建,都写好了,这里是根据前面环境部署的 192.168.30.21 ansible 192.168.30.25 ...
- Error from server at http://127.0.0.1:8983/solr/xxx: undefined field type
undefined field type就是说没有定义type类型,这样情况下,可以新建一个带type的索引,比如:{type:1, id:1, name:"张三"}
- C解析config
#cat bb.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include < ...
- STM32学习笔记:读写内部Flash(介绍+附代码)
一.介绍 首先我们需要了解一个内存映射: stm32的flash地址起始于0x0800 0000,结束地址是0x0800 0000加上芯片实际的flash大小,不同的芯片flash大小不同. RAM起 ...