360浏览器无法得到window.showModalDialog返回值
父窗口页面中<scriptlanguage="javascript"type="text/javascript">functionbtnGetReturnValue_on...
父窗口页面中
<script language="javascript" type="text/javascript">
function btnGetReturnValue_onclick()
{
var temp= window.showModalDialog("SupSelect.aspx",this, "dialogWidth:800px;dialogHeight:600px;center:yes;help:no;resizable:no;status:no;location:no;");
if(temp==undefined)
{
temp = window.returnValue;
}
if(temp=='')
{
temp="|";
}
var array = temp.split("|");
document.getElementById("inputSupID").value = array[0];
document.getElementById("inputSupName").value = array[1];
}
</script>
子窗口。cs中
protected void imgBtnConfirm_Click(object sender, ImageClickEventArgs e)
{
string str="";
int COUNT = 0;
foreach (GridViewRow item in this.GridView1.Rows)
{
if (((CheckBox)item.FindControl("CheckBox1")).Checked)
{
COUNT = COUNT + 1;
str = ((Label)item.FindControl("Label1")).Text.Trim() + "|"+((Label)item.FindControl("Label2")).Text.Trim();
break;
}
}
if (COUNT == 0)
{
Response.Write("<script language=javascript>alert('请选择一个供应商!')</script>");
}
if (COUNT >= 2)
{
Response.Write("<script language=javascript>alert('只能选择一个供应商!')</script>");
}
Response.Write("<script language=javascript>window.returnValue ='" + str + "';window.close();</script>");
}
用IE和火狐都可以取得返回值,但是360浏览器返回就是undefined,怎么写都不行,请问大家有什么办法吗,非常感谢 展开
<script language="javascript" type="text/javascript">
function btnGetReturnValue_onclick()
{
var temp= window.showModalDialog("SupSelect.aspx",this, "dialogWidth:800px;dialogHeight:600px;center:yes;help:no;resizable:no;status:no;location:no;");
if(temp==undefined)
{
temp = window.returnValue;
}
if(temp=='')
{
temp="|";
}
var array = temp.split("|");
document.getElementById("inputSupID").value = array[0];
document.getElementById("inputSupName").value = array[1];
}
</script>
子窗口。cs中
protected void imgBtnConfirm_Click(object sender, ImageClickEventArgs e)
{
string str="";
int COUNT = 0;
foreach (GridViewRow item in this.GridView1.Rows)
{
if (((CheckBox)item.FindControl("CheckBox1")).Checked)
{
COUNT = COUNT + 1;
str = ((Label)item.FindControl("Label1")).Text.Trim() + "|"+((Label)item.FindControl("Label2")).Text.Trim();
break;
}
}
if (COUNT == 0)
{
Response.Write("<script language=javascript>alert('请选择一个供应商!')</script>");
}
if (COUNT >= 2)
{
Response.Write("<script language=javascript>alert('只能选择一个供应商!')</script>");
}
Response.Write("<script language=javascript>window.returnValue ='" + str + "';window.close();</script>");
}
用IE和火狐都可以取得返回值,但是360浏览器返回就是undefined,怎么写都不行,请问大家有什么办法吗,非常感谢 展开
2个回答
展开全部
360与谷歌问题相似
Response.Write("<script language=javascript>if (window.opener != undefined){ window.opener.returnValue ='" + str + "'; window.opener.close();}else{window.returnValue = '" + str + "';}window.close();</script>");
Response.Write("<script language=javascript>if (window.opener != undefined){ window.opener.returnValue ='" + str + "'; window.opener.close();}else{window.returnValue = '" + str + "';}window.close();</script>");
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在360安全浏览器的地址栏里输入se://flags/看能否有你需要的设置
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询