<%
dim id
id=request.querystring("id")
URL1="URL1.asp?id="&id
%>
<script language="jscript.encode">
<!--
document.write ("<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" hid=\"MediaPlayer1\">\n")
document.write ("<param name=\"Filename\" value=" + URL1 + ">\n")
document.write ("<param name=\"ShowStatusBar\" value=\"-1\">\n")
document.write ("<PARAM NAME=\"rate\" VALUE=\"1\">\n")
document.write ("<PARAM NAME=\"balance\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"currentPosition\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"defaultFrame\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"playCount\" VALUE=\"100\">\n")
document.write ("<PARAM NAME=\"autoStart\" VALUE=\"-1\">\n")
document.write ("<PARAM NAME=\"baseURL\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"volume\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"mute\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"uiMode\" VALUE=\"full\">\n")
document.write ("<PARAM NAME=\"stretchToFit\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"windowlessVideo\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"enabled\" VALUE=\"-1\">\n")
document.write ("<PARAM NAME=\"enableContextMenu\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"fullScreen\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"SAMIFilename\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"captioningID\" VALUE=\"\">\n")
document.write ("</object>\n")
//-->
</script>
因为在网页中,JSCRIPT脚本语言是在 ASP语言前执行的,所以这里的
document.write ("<param name=\"Filename\" value=" + URL1 + ">\n") 的URL1 根本还没有得到值
怎么才能取到这个URL1 的价值了?
答完题我就睡了,好困了!!!你试下吧.应该没什么太大的问题.
<%
dim id
id=request.querystring("id")
URL1="URL1.asp?id="&id
%>
<%
Response.Write("<script language="&Chr(34)&"jscript.encode"&Chr(34)&">")
Response.Write("<!--")
Response.Write("document.write ("&Chr(34)&"<object classid=\"&Chr(34)&"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"&Chr(34)&" hid=\"&Chr(34)&"MediaPlayer1\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<param name=\"&Chr(34)&"Filename\"&Chr(34)&" value="&Chr(34)&" + "&URL1&" + "&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<param name=\"&Chr(34)&"ShowStatusBar\"&Chr(34)&" value=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"rate\"&Chr(34)&" VALUE=\"&Chr(34)&"1\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"balance\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"currentPosition\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"defaultFrame\"&Chr(34)&" VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"playCount\"&Chr(34)&" VALUE=\"&Chr(34)&"100\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"autoStart\"&Chr(34)&" VALUE=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"baseURL\"&Chr(34)&" VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"volume\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"mute\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"uiMode\"&Chr(34)&" VALUE=\"&Chr(34)&"full\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"stretchToFit\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"windowlessVideo\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"enabled\"&Chr(34)&" VALUE=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"enableContextMenu\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"fullScreen\"&Chr(34)&" VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"SAMIFilename\"&Chr(34)&" VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"<PARAM NAME=\"&Chr(34)&"captioningID\"&Chr(34)&" VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")
Response.Write("document.write ("&Chr(34)&"</object>\n"&Chr(34)&")")
Response.Write("//-->")
Response.Write("</script>")
%>
<%
dim id
id=request.querystring("id")
URL1="URL1.asp?id="&id
%>
<script language="jscript.encode">
<!--
var URL1 = "<%=URL1%>";
document.write ("<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" hid=\"MediaPlayer1\">\n")
document.write ("<param name=\"Filename\" value=" + URL1 + ">\n")
document.write ("<param name=\"ShowStatusBar\" value=\"-1\">\n")
document.write ("<PARAM NAME=\"rate\" VALUE=\"1\">\n")
document.write ("<PARAM NAME=\"balance\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"currentPosition\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"defaultFrame\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"playCount\" VALUE=\"100\">\n")
document.write ("<PARAM NAME=\"autoStart\" VALUE=\"-1\">\n")
document.write ("<PARAM NAME=\"baseURL\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"volume\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"mute\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"uiMode\" VALUE=\"full\">\n")
document.write ("<PARAM NAME=\"stretchToFit\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"windowlessVideo\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"enabled\" VALUE=\"-1\">\n")
document.write ("<PARAM NAME=\"enableContextMenu\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"fullScreen\" VALUE=\"0\">\n")
document.write ("<PARAM NAME=\"SAMIFilename\" VALUE=\"\">\n")
document.write ("<PARAM NAME=\"captioningID\" VALUE=\"\">\n")
document.write ("</object>\n")
//-->
</script>
ghaihua(晨昕) ( )
你的答法和楼主的好象没什么区别哦~~,呵呵
zj135(zj135) ( )
var URL1 = "<%=URL1%>"; 这里的URL1还是没有不值的``
关注下
var URL1 = "<%=URL1%>"; 正确的阿,还有网页都是先执行服务端代码的,然后执行客户端代码。