没有这个问题,我用过的
<script language="javascript">
<!--
function openwin1(id)
{
var window_width = 400;
var window_height = 265;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open("showTemporory.aspx?id="+id+"","","height="+window_height+",width="+window_width+",left="+window_left+",top="+window_top+",resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
newWindow.focus();
}
//-->
</script><asp:TemplateColumn HeaderText="其它" FooterText="其它">
<ItemTemplate>
<asp:Label runat="server" Font-Size="10" Width="30" ID="Label1">
<a href='<%# "javascript:openwin1("+DataBinder.Eval(Container.DataItem,"temporaryId").ToString() +")" %>' >
其它</a>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<script language="javascript">
<!--
function openwin1(id)
{
var window_width = 400;
var window_height = 265;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open("showTemporory.aspx?id="+id+"","","height="+window_height+",width="+window_width+",left="+window_left+",top="+window_top+",resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
newWindow.focus();
}
//-->
</script><asp:TemplateColumn HeaderText="其它" FooterText="其它">
<ItemTemplate>
<asp:Label runat="server" Font-Size="10" Width="30" ID="Label1">
<a href='<%# "javascript:openwin1("+DataBinder.Eval(Container.DataItem,"temporaryId").ToString() +")" %>' >
其它</a>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<a href='<%# "javascript:window.open('AddMember.aspx','sub','width=300 height=300')" %>'>增加新会员</a>
<a href='<%# "javascript:window.open('AddMember.aspx','sub','width=300 height=300')" %>'>增加新会员</a>
改为
<a href="<%# 'javascript:window.open(\'AddMember.aspx\',\'sub\',\'width=300 height=300\')' %>">增加新会员</a>
Label1.Attributes.Add("onclick","javascript:window.open('AddMember.aspx','sub','width=300 height=300')");
<a href='javascript:window.open.............'
这样子不好用,是会出现你窗口什么都没有的问题,
但是如果改成
<a href=执行函数,打开新窗口,成功
或者也可以改成
<a href="#" onclick='javascript....'也成功.
不知道为什么.
不知道这种理解是否正确..??
你这种方法可以,但是因为我在子窗口还有一个对父窗口的刷新,如果父窗口变成了“父窗口.asp#”就不能进行这个刷新的动作了