<script>
var bClose = false;
var timeClose = null;
//初始化是打开工作页面
function window.onload()
{
var iW,iH,iS;
iW = screen.availWidth - 10;
iH = screen.availHeight - 50;
strStyle = "directories=no,left=-4,top=-4,location=no,status=1,menubar=0,fullscreen=0,resizable=1,scrollbars=auto,toolbar=no,width=" + iW + ",height=" + iH;
window.open("smMain.aspx","",strStyle);
var n_ver = navigator.appVersion;
if(n_ver.indexOf('MSIE 6.0')>0)
{
window.opener=null;
window.close(); //IE6.0以上(打了SP1EXPRESS)用这种方法关闭,否则不能正常关闭
}
else
{
window.close ();
}
}
function closeWindow()
{
try
{
if (bClose)
{
txtFocus.focus();
window.clearInterval(timeClose);
Closes.Click();
}
}
catch(e)
{
;
}
}
</script>
这种方法会被上网助手拦截,我要不让上网助手给拦截!
我不知道该怎么办希望大家给我帮助,在此先谢谢了
var bClose = false;
var timeClose = null;
//初始化是打开工作页面
function window.onload()
{
var iW,iH,iS;
iW = screen.availWidth - 10;
iH = screen.availHeight - 50;
strStyle = "directories=no,left=-4,top=-4,location=no,status=1,menubar=0,fullscreen=0,resizable=1,scrollbars=auto,toolbar=no,width=" + iW + ",height=" + iH;
window.open("smMain.aspx","",strStyle);
var n_ver = navigator.appVersion;
if(n_ver.indexOf('MSIE 6.0')>0)
{
window.opener=null;
window.close(); //IE6.0以上(打了SP1EXPRESS)用这种方法关闭,否则不能正常关闭
}
else
{
window.close ();
}
}
function closeWindow()
{
try
{
if (bClose)
{
txtFocus.focus();
window.clearInterval(timeClose);
Closes.Click();
}
}
catch(e)
{
;
}
}
</script>
这种方法会被上网助手拦截,我要不让上网助手给拦截!
我不知道该怎么办希望大家给我帮助,在此先谢谢了
解决方案 »
- 数据类型
- PropertyGrid控件能否动态添加键值对?
- 我新建了数据库和表,然后添加了一行记录,并在代码中写了这些代码,但界面上没显示,咋回事?
- C#中解析用DTS從資料庫導出的Excel遇到的問題
- ListBox多选的问题
- DataGrid 主次表现示的问题
- C#应用程序里,DataGrid里的三个问题急切求助!
- 如何用.net自带的PrintDocument类实现打印简单的 出库单 打印? 急!
- 谁知道 那里有类似acdsee的开源项目?
- 多个文本文档 txt类型文件 批量处理 批量删除 批量修改 批量替换 批量查找 批量添加
- 如何在For循环中,让每秒种执行一次循环?
- 用DataGrid新增到数据库后自动ID的问题?
在DataGrid中建一个模板列,在模板列中放一个客户端的Button,或者直接写你要的字句,然后用<a href>连接
例:
<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>
What Does the Pop-up Blocker Block?
The Pop-up Blocker blocks script-initiated pop-up windows that are created by the following methods, without the user clicking a link. If users enable the most restrictive setting in the Pop-up Blocker Settings, the Pop-up Blocker blocks windows that are opened by these methods from a user-initiated action, such as clicking a page element or tabbing to a link and then pressing ENTER.window.open
window.showHelp
window.showModalDialog
window.showModelessDialog
window.external.NavigateAndFindIn addition to blocking script-initiated pop-up windows, the Pop-up Blocker also blockssetHomePage() from launching automatically. This function can be launched only from a user-initiated action, such as clicking a page element or tabbing to a link and then pressing ENTER.
Scripts from automatically targeting the search pane.
Windows that are opened automatically from DHTML elements that overlap content on the same page.
Scripts from calling window.open on an onunload event in an attempt to get the user to stay on a site, or to serve the user one more ad.
Scripts from targeting and then navigating to a named frame that doesn't exist.
When the Pop-up Blocker prevents pop-up windows from appearing, the action triggers the Information Bar. Users can decide if they want to see the blocked window by clicking on the Information Bar.
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);