看到我的插件在pjblog这么受欢迎,实在很高兴,长期以来收到反馈最多的问题,莫过于播放器的防刷新,今天我贴上一段代码,给大家参考一下
复制内容到剪贴板
代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;">
<title>简单生活-左手一支刀,右手一支叉,把生活慢慢享受!</title>
<script>
function framebutton(){
var obj = document.getElementById('navigation');
var musicobj = document.getElementById('topFrame');
var frameswitch = document.getElementById('frameswitch');
var switchbar = document.getElementById('switchbar');
if(obj.style.width == '1px'){
obj.style.width = '200px';
musicobj.style.width = '200px';
switchbar.style.left = '200px';
frameswitch.style.backgroundPosition = '0';
frameswitch.src = 'http://www.wilf.cn/plugin/flamp3/images/btn_hide.jpg';
}else{
obj.style.width = '1px';
musicobj.style.width = '1px';
switchbar.style.left = '1px';
frameswitch.style.backgroundPosition = '-11';
frameswitch.src = 'http://www.wilf.cn/plugin/flamp3/images/btn_show.jpg';
}
}
if(top != self) {
top.location = self.location;
}
</script>
</head>
<body style="height: 100%; margin: 0; padding: 0;" scroll="no">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id="navigation" style="width:1px; height:200px; url(http://www.wilf.cn/plugin/flamp3/images/bg_framebottom.jpg) no-repeat left bottom; vertical-align:top; ">
<iframe src="http://www.wilf.cn/plugin/flamp3/widget_code.asp" frameborder="0" scrolling="no" style="width:1px; height:100% ;" name="topFrame" id="topFrame"></iframe>
</td>
<td style="height: 100%;width: 100%;">
<table id="switchbar" width="14" height="100%" cellspacing="0" cellpadding="0" border="0" style="position: absolute; left: 1px; background-repeat: repeat-y; background-position: -200px; repeat-y left center;">
<tbody>
<tr>
<td onClick="framebutton()" style="display:"><img id="frameswitch" border="0" src="http://www.wilf.cn/plugin/flamp3/images/btn_show.jpg" style="background-position: 0pt 50%;"/></a></td>
</tr>
</tbody>
</table>
<iframe style="height: 100%; width: 100%; " src="http://www.wilf.cn/default.html" name="mainFrame" frameborder="0" scrolling="yes"></iframe>
</td>
</tr>
</table>
</body>
</html>
隐藏在侧栏中,可以开启,为什么没有集成在插件里?因为以目前pjblog的插件机制,这个不属于插件力所能及范围内。
大家如果有需要,可以把上面的代码,保存下来,修改框架链接以及图片地址便可使用。
网友评论