Home > php教程 > php手册 > 【新提醒】JS实现新提醒标题闪烁

【新提醒】JS实现新提醒标题闪烁

WBOY
Release: 2016-06-07 11:35:56
Original
1306 people have browsed it

JS实现新提醒标题闪烁效果的源码分享 | 可直接复制粘贴使用
var newRemindFlag = 1; //启动闪烁
/*
pageTitle:原页面的标题
showRemind:闪烁时显示的东东:如【新提醒】
hideRemind:闪烁时隐藏的东东:如【   】
time:闪烁间隔的时间
*/
function newRemind(pageTitle, showRemind, hideRemind, time) {
if (newRemindFlag == 1) {
document.title = showRemind + pageTitle;
newRemindFlag = 2;
} else {
document.title = hideRemind + pageTitle;
newRemindFlag = 1;
}
setTimeout("newRemind('" + pageTitle + "','" + showRemind + "','" + hideRemind + "'," + time + ")", time);
}

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template