showModalDialog的返回值 看不出毛病来,把你的t2.asp贴出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 忘了說明一點,若val=showModalDialog("t3.htm");t3.htm...returnValue="abc";...可以得到abc的值.會不會是showModalDialog不適用asp文件.t2.asp,有掛羊頭賣狗肉之嫌:)<%@ language=VBScript%><HTML><HEAD><Script language="javascript"><!--function SetVal(){ returnValue="abc"; close();}//--></Script></HEAD><BODY onUnLoad="alert(returnValue);"> //此處為abc <input type="button" value="Btn1" onClick="SetVal();"></BODY></HTML> I still got a return value of "abc" even if it is a t2.asp page 您確定是在t1.htm中得到的值嗎?我無論如何也得不到.環境;繁體中文Windows2000. 我在IIS5上试过的,t2.asp能传回值来 t1.html:<script language="javascript">function showpage(){alert(showModalDialog("t2.asp"));}</script><input type="button" value="getval" onClick="showpage();">t2.asp:<%@ language=VBScript%><HTML><HEAD><Script language="javascript"><!--function SetVal(){ returnValue="abc"; close();}//--></Script></HEAD><BODY onUnLoad="alert(returnValue);"> <input type="button" value="Btn1" onClick="SetVal();"></BODY></HTML> 不好意思,突然上不了csdn了.到中午才恢復.這樣做確實可以.但是...假設t1.htm和t2.asp在IIS虛擬路徑test下.function showpage(){alert(showModalDialog("http://127.0.0.1/test/t2.asp"));}這樣子的話,就返回不了值了.Why? 可能我還是沒有講清楚.t1.htm直接雙擊用IE打開,t1中的showpage()為alert(showModalDialog("http://127.0.0.1/test/t2.asp"));這樣子就返回不了值了,為什麼? 原來showModalDialog只在同一站點之間適用. 【我快疯了】关于正则match WdatePicker怎样固定时分秒啊? 请教两个问题 1,如何在一个页面控制另一个页面的元素! 求助JS问题 如何向已经追加了图片的textarea中不通过键盘继续追加值 请教修改一段代码 如何用javascript 给html获得焦点 在线等 明白马上给分 js shell reg 子键 iframe能只显示垂直的滚动条而把水平的滚动条禁止了吗?我搜了所有的帖子也没有找到答案,好像是不可能的? 菜鸟求jQuery两个相同内容的函数合并的方法 net_lover(孟子E章) 来来来!!!!!!!!! 请大家看看,版主帮忙!!
t3.htm
...
returnValue="abc";
...
可以得到abc的值.
會不會是showModalDialog不適用asp文件.t2.asp,有掛羊頭賣狗肉之嫌:)
<%@ language=VBScript%>
<HTML>
<HEAD>
<Script language="javascript">
<!--
function SetVal()
{
returnValue="abc";
close();
}
//-->
</Script>
</HEAD>
<BODY onUnLoad="alert(returnValue);"> //此處為abc
<input type="button" value="Btn1" onClick="SetVal();">
</BODY>
</HTML>
我無論如何也得不到.
環境;繁體中文Windows2000.
function showpage()
{
alert(showModalDialog("t2.asp"));
}
</script>
<input type="button" value="getval" onClick="showpage();">t2.asp:
<%@ language=VBScript%>
<HTML>
<HEAD>
<Script language="javascript">
<!--
function SetVal()
{
returnValue="abc";
close();
}
//-->
</Script>
</HEAD>
<BODY onUnLoad="alert(returnValue);">
<input type="button" value="Btn1" onClick="SetVal();">
</BODY>
</HTML>
假設t1.htm和t2.asp在IIS虛擬路徑test下.
function showpage()
{
alert(showModalDialog("http://127.0.0.1/test/t2.asp"));
}
這樣子的話,就返回不了值了.Why?
t1.htm直接雙擊用IE打開,
t1中的showpage()為alert(showModalDialog("http://127.0.0.1/test/t2.asp"));
這樣子就返回不了值了,為什麼?