onclick中的javascript在火狐下失效但是在ie8和360浏览器下正常,代码如下:
onclick中的javascript在火狐下失效但是在ie8和360浏览器下正常,代码如下:
var _t;
var _h = 0;
var _m = 0;
var _s = 10;
var _v = formatTime(_h + ':' + _m + ':' + _s);
function doTime()
{
_s --;
if (_s == -1)
{
_m --;
_s = 59;
}
if (_m == -1)
{
_h --;
_m = 59;
}
var _b = ((_h == 0) && (_m == 0) && (_s == 0));
if (_b)
{
window.location.href='xinpian.php' ;
clearTimeout(_t);
}
else
{
_v = formatTime(_h + ':' + _m + ':' + _s);
_t = setTimeout('doTime()', 1000);
}
document.all.oTime.innerHTML = _v;
}
function formatTime(_time)
{
return _time.replace(/\b(\w)\b/g, '0$1');
}
function start_time()
{
document.all.oTime.innerHTML = _v;
_t = setTimeout('doTime()', 1000);
document.all.imagebutton.style.display = "none";
document.getElementById('top').style.display = "none";
document.getElementById('logo').style.display = "none";
document.getElementById('online').style.display = "none";
document.getElementById('but').style.display = "none";
document.getElementById('bot').style.display = "none";
document.getElementById('zindex').style.display = "block";
}
展开