| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 637 人关注过本帖
标题:[求助][求助]关于地址传递参数的问题!
只看楼主 加入收藏
ctmdbb
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-10-15
收藏
 问题点数:0 回复次数:1 
[求助][求助]关于地址传递参数的问题!


我有一远古电影的播放代码.

现在想通过URL传递ID来打开电影

意思就是通过如下这样的URL将1234传递补到play.asp
http://www.***.com/play.asp?id=1234


播放器的代码码如:


<script language="JScript">
document.onkeydown = function()
{
if(event.keyCode != 27)
{
event.keyCode = 0;
event.returnValue = false;
}
}
function PlayerError()
{
if(window.opener == undefined)history.back(-1);
else self.close();
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>Arhz</title>
</head>
<body onContextMenu="window.event.returnValue=false;" bgcolor="#000000" topMargin="0" leftMargin="0" style="border-color:#000000;" >
<table align="center" cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td align="center" valign="middle">
<object id="WebPlayer" width="1024" height="768" classid="CLSID:AA899B43-24BD-4B6B-BBD0-45557D8D11E0" VIEWASTEXT>
<param name="_Version" value="65536">
<param name="_ExtentX" value="10583">
<param name="_ExtentY" value="10583">
<param name="_StockProps" value="0">
</object>
</td>
</tr>
</table>
<script language="JScript">
x = CheckPlayer();
function PlayerInit(szServerHost)
{
[123]
WebPlayer.ServerMode = "2";
WebPlayer.UserName = "";
WebPlayer.UserID = "";
WebPlayer.PlayMode = "1"; //SendType
WebPlayer.PlayModeValue ="通过URL来得到的ID值"; //MultiIP_Addr
WebPlayer.ChannelID = "703";
WebPlayer.AuthenHost ="url";
WebPlayer.ServerHost = "1.1.1.1"; //IpAddr
WebPlayer.Session = ""; //"";
WebPlayer.ProtocolType = "1";
WebPlayer.EmbedMode = "1";
WebPlayer.ProgName = "电影名称";
WebPlayer.ContorlWidth = 322;
WebPlayer.ContorlHeight = 320;
WebPlayer.Start();
}
function RestorePlayerWindow(iWidth, iHeight)
{
window.resizeTo(iWidth, iHeight);
availWidth = screen.Width;
availHeight = screen.availHeight;
iTmpPix = availWidth - iWidth;
iWinLeft = iTmpPix / 2;
iTmpPix = availHeight - iHeight;
iWinHeight = iTmpPix / 2;
window.moveTo(iWinLeft, iWinHeight);
}
function GetHostName(szUrl)
{
iNameSize = szUrl.indexOf("/", 7) - 7;
szUrl = szUrl.substr(7, iNameSize);
if(szUrl.indexOf(":") > 0)iNameSize = szUrl.indexOf(":");
szHostName = szUrl.substr(0, iNameSize);
return szHostName;
}
function GetHostPort(szUrl)
{
var szHostPort, iPortPos, iPortSize;

if(szUrl.indexOf(":", 5) > 0)
{
iPortPos = szUrl.indexOf(":", 5) + 1;
if(szUrl.indexOf("/", iPortPos) > 0)iPortSize = szUrl.indexOf("/", iPortPos) - iPortPos;
szHostPort = szUrl.substr(iPortPos, iPortSize);
}
else
{
szHostPort = 80;
}
return szHostPort;
}
function CheckPlayer()
{
try
{
var oTest = new ActiveXObject("VGPlayer.WebVGPlayer.1");
}
catch(e)
{
if(window.opener == undefined)
{
window.alert("首次点播将安装播放器插件...");
window.open("../download/WebPlayer.exe");
history.back(-1);
}
else
{
window.opener.alert("首次点播将安装播放器插件...");
window.opener.open("../download/WebPlayer.exe");
self.close();
}
return false;
}
delete oTest;
PlayerInit("1.1.1.1");
//RestorePlayerWindow(334, 352);
return true;
}
function GetServerHost()
{
szServerHost = "";
if(szServerHost.length == 0)
{
alert("\n对不起,服务器集群负荷已满或您的地址不在服务范围内!");
self.close();
}
if(szServerHost == "-1")szServerHost = GetHostName(this.location.href) + ":80";
return szServerHost;
}
</script>
</body>
</html>

搜索更多相关主题的帖子: 参数 event 地址 function 
2007-10-16 08:06
tianyu123
Rank: 1
等 级:新手上路
威 望:2
帖 子:576
专家分:0
注 册:2007-8-26
收藏
得分:0 


WebPlayer.PlayModeValue ="<%=request.querystring("id")%>"; //MultiIP_Addr

改变一切,须从改变观念开始!
2007-10-16 09:56
快速回复:[求助][求助]关于地址传递参数的问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012527 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved