function hello(){
var shi = document.getElementById("player");
var a = shi.ended;
if(a == true){
window.location.href="lingquhongbao.php";
window.clearInterval(t2);
}
}
//重复执行某个方法
var t2 = window.setInterval("hello()",2000);
$(function(){
var interval = setInterval(increment,100);
var current = 0;
function increment(){
current++;
$('#counter').html(current+'%');
if(current == 100) { current = 0; }
}
$('.load-bar').mouseover(function(){
clearInterval(interval);
}).mouseout(function(){
interval = setInterval(increment,100);
});
});