手机端代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>播放器</title>
<style>body{margin:0;padding:0;}</style>
<link href="common.css" type="text/css" rel="stylesheet" />
<script src="common.js"></script>
<script language="javascript">
function codefans(){
var box=document.getElementById("divbox");
box.style.display="none";
}
//2秒,可以改动
setTimeout("codefans()",20000);
</script>
</head>
<body>
<div id="divbox" style="width:80%; margin:0 auto; z-index:9999999999; line-height:30px; height:30px; font-size:14px; position:absolute; color:#00a2ff; top:5px; left:10%; text-align:center;border-radius: 8px;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;border:#00a2ff solid 1px; "> 片内第三方广告,勿轻信! </div>
<script type="text/javascript" language="javascript">
var Url = window.parent.url;
var Str = '<iframe src="http://www.baidu.com/?url='+Url+'" width="100%" scrolling="no" height="'+h+'" align="middle" frameborder="no" hspace="0" vspace="0" marginheight="0" marginwidth="0" name="tv" allowfullscreen="true"></iframe>';
document.write(Str);
</script>
</body>
效果图
PC端代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>播放器</title>
<style>body{margin:0;padding:0;z-index:2147483647;}</style>
<link href="common.css" type="text/css" rel="stylesheet" />
<script src="common.js"></script>
<script language="javascript">
function codefans(){
var box=document.getElementById("divbox");
box.style.display="none";
}
//2秒,可以改动
setTimeout("codefans()",20000);
</script>
</head>
<body>
<div id="divbox" style="width:70%; margin:0 auto; height:35px; line-height:35px; font-size:15px;color:#00a2ff; position:absolute;top:20px; left:15%; text-align:center; border-radius: 8px;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;border:#00a2ff solid 1px; "><b>重要提示:云播频道非字幕组原版资源,片内广告系第三方植入,请勿相信!</b></div>
<div style="z-index:2147483647;">
<script type="text/javascript" language="javascript">
var Url = window.parent.url;
var Str = '<iframe src="http://www.baidu.com/?url='+Url+'" width="100%" scrolling="no" height="'+h+'" align="middle" frameborder="no" hspace="0" vspace="0" marginheight="0" marginwidth="0" name="tv" allowfullscreen="true"></iframe>';
document.write(Str);
</script>
</div>
</body>