js实现:
<script>
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r != null) return unescape(r[2]);
return null;
}
window.οnlοad=function() {
var img=document.getElementById("type");
img.setAttribute("src","img/tiche/"+GetQueryString("carmodel")+".jpg");
}
</script>
<div style="margin-top:40px">
<img src="" width="100%">
<img src="" width="100%">
<img id="type" src="" width="100%">
</div>
<html>
<head>
<meta name="renderer" content="ie-stand|ie-comp|webket">
<meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10" />
<script type="text/javascript">
window.οnlοad=function(){
var codeId = GetQueryString('id');
// alert(codeId);
var img=document.getElementById("wu");
img.setAttribute("src","http://10.0.1.9:6713/mag/hls/"+codeId+"/0/live.m3u8");
var player = videojs("example-video");
player.play();
}
</script>
<SCRIPT>
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}
</SCRIPT>
<link href="/cxfvp/static/css/video-js.css" rel="stylesheet" type="text/css">
<script src="/cxfvp/static/js/video.min.js" type="text/javascript"></script>
<script src="/cxfvp/static/js/videojs-contrib-hls.js" type="text/javascript"></script>
</head>
<body>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>视频</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<video id="example-video" class="video-js"
width="1200" height="750" >
<source id="wu" src="http://10.0.1.9:6713/mag/hls/codeId/0/live.m3u8" type="application/x-mpegURL">
</video>
</td>
</tr>
</tbody>
</table>
</body>
</html>