发现下面语句不弹出对话框:
Response.Write("<script>alert('........');</script>");
Response.Redirect("WebForm35.aspx");怎样才能弹出对话框后在转页?
谢谢
Response.Write("<script>alert('........');</script>");
Response.Redirect("WebForm35.aspx");怎样才能弹出对话框后在转页?
谢谢
解决方案 »
- 用ACCESS数据库,日期类型字段出现“标准表达式中数据类型不匹配”错误
- asp:button 传值问题!!!
- 水晶报表中的图标专家无法使用
- 网站并发性问题和浮动窗体问题
- DataGrid to Excel
- 请问在C#中编写的函数,如果想把传递的参数设置成可选的,怎么实现?急!!
- 求助,修改数据出现System.NullReferenceException: 未将对象引用设置到对象的实例。
- 不解.基础问题.关于<%@ 的使用方法
- 为什么datalist里面加载Label控件时,没有text属性
- 求救!哪儿能找到替代datagrid的这样的控件?
- 100分求教一个简单的FTP问题,进来看看啊!!!!~~~~~~~~~~~~~~~~~
- 问一段储存过程的错误!!!
Response.Write("<script language='javascript'>alert('........')</script>");
alert('........');
window.open("WebForm35.aspx","_self");
</script>");
就可以了,注意"_self".
function aa()
{
alert("转到2.aspx页");
document.location.href='2.aspx';
</script><input type=button value="redirect" onclick=aa()>
的确是个好方法,但是我的弹出框是有条件的
如
if(条件)
{
Response.Write("<script>alert('........');</script>");
}
else
{
//do nothing
}
Response.Redirect("WebForm35.aspx");这样怎么改?
如果改成Response.Write("<script>alert('........');location='WebForm35.aspx'</script>");
则,无论如何都会弹出对话框声明,不想用变量或session 来标示 条件 是否成立
再等
{
Response.Write("<script>alert('');location='WebForm35.aspx'</script>");
}
else
{
Response.Redirect("WebForm35.aspx");
}