JS脚本页面间的URL传值

JS脚本页面间的URL传值,第1张

VidListhtml 部分内容
<div class="neirong_wenben"><div id="cont">
<table border="0" cellpadding="0" cellspacing="0" bordercolor="#99CC33" width="100%" height="100%">
<tr bgcolor="#E3F4FE">
<td align="left" width="80%">      
<a href="OneVidhtmlid=M2U00033">古诗词诵读(一)</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00033">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00100">古诗词诵读(二)</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00100">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00222">书记检查德育工作(一)</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00222">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00225">书记检查德育工作(二)</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00225">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00032">书香校园之一</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00032">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00073">书香满校园之二</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00073">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00077">书香满校园之三</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00077">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00080">书香满校园之四</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00080">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00102">书香满校园之五</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00102">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00013">赈灾之一</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00013">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00025">赈灾之二</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00025">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00026">赈灾之三</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00026">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00027">赈灾之四</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00027">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00034">赈灾之五</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00034">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=M2U00043">赈灾之六</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00043">进入观赏>></a></td>
</tr>
<tr>
<td align="left">      
<a href="OneVidhtmlid=M2U00065">赈灾之七</a></td>
<td width="20%"><a href="OneVidhtmlid=M2U00065">进入观赏>></a></td>
</tr>
<tr bgcolor="#E3F4FE">
<td align="left">      
<a href="OneVidhtmlid=体育节">体育节</a></td>
<td width="20%"><a href="OneVidhtmlid=体育节">进入观赏>></a></td>
</tr>
</table>
</div></div>
文件:OneVidhtml 部分代码(JS接收传递值在此进行)
<div class="neirong_Left">
<div class="libiao_LeftTit"><a href="Indexhtml" target="_blank">首页 </a>> <a href="VidListhtml" target="_blank">视频列表</a> > 单张展示</div>
<div class="neirong">
<div class="neirong_biaoti">
<div id="mocrTitle"><!--这里是标题信息--></div></div>
<div class="neirong_laiyuan"><div id="mocrTime">2009-06-19</div></div>

<div class="neirong_wenben"><div id="cont" align="center">
<!--这里插入视频文件代码-->
</div></div>

<div class="neirong_wenben right"></div>
责任编辑:XXX
</div>
</div>
<!--以下JS内容放在HTML文件最末-->
<script language="javascript" type="text/javascript">
var List = [["M2U00033","古诗词诵读(一)","M2U00033wmv"],
["M2U00100","古诗词诵读(二)","M2U00100wmv"],
["M2U00222","书记检查德育工作(一)","M2U00222wmv"],
["M2U00225","书记检查德育工作(二)","M2U00225wmv"],
["M2U00032","书香满校园之一","M2U00032wmv"],
["M2U00073","书香满校园之二","M2U00073wmv"],
["M2U00077","书香满校园之三","M2U00077wmv"],
["M2U00080","书香满校园之四","M2U00080wmv"],
["M2U00102","书香满校园之五","M2U00102wmv"],
["M2U00013","赈灾之一","M2U00013wmv"],
["M2U00025","赈灾之二","M2U00025wmv"],
["M2U00026","赈灾之三","M2U00026wmv"],
["M2U00027","赈灾之四","M2U00027wmv"],
["M2U00034","赈灾之五","M2U00034wmv"],
["M2U00043","赈灾之六","M2U00043wmv"],
["M2U00065","赈灾之七","M2U00065wmv"],
["体育节","体育节","体育节wmv"]
];
//增加正则表达式
StringprototypegetQueryString = function(name)
{
var reg = new RegExp("(^|&|\\)"+ name +"=([^&])(&|$)"), r;
if (r=thismatch(reg)) return unescape(r[2]);
return null;
};
var sId = locationsearchgetQueryString("id"); //通过表达式获得传递参数
//alert(sId);
//var IDID = "25"
for(var i = 0;i<20; i++){
if(sId == List[i][0])
{
documentgetElementById('mocrTitle')innerHTML =List[i][1]; //这里写入标题信息
documentgetElementById('cont')innerHTML = "<embed src='vidio/"+List[i][2]+"' width ='600px' height='500px' autostart='true'></embed> ";//这里写入信息
//<embed src="TodImage/123mpg" width="600" height="400" autostart="true"></embed>
}
}
</script>

以上就是关于JS脚本页面间的URL传值全部的内容,包括:JS脚本页面间的URL传值、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/9387040.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-27
下一篇 2023-04-27

发表评论

登录后才能评论

评论列表(0条)

保存