网页标题title的闪动提示
来源:互联网 发布:360软件管家 thunder 编辑:程序博客网 时间:2024/05/21 17:54
转自:http://www.nowamagic.net/librarys/veda/cate/JavaScript
<script type="text/javascript" language="javascript"> var flashTitlePlayer = { start: function (msg) { this.title = document.title; if (!this.action) { try { this.element = document.getElementsByTagName('title')[0]; this.element.innerHTML = this.title; this.action = function (ttl) { this.element.innerHTML = ttl; }; } catch (e) { this.action = function (ttl) { document.title = ttl; } delete this.element; } this.toggleTitle = function () { this.action('【' + this.messages[this.index = this.index == 0 ? 1 : 0] + '】欢迎访问简明现代魔法'); }; } this.messages = [msg]; var n = msg.length; var s = ''; if (this.element) { var num = msg.match(/\w/g); if (num != null) { var n2 = num.length; n -= n2; while (n2 > 0) { s += " "; n2--; } } } while (n > 0) { s += ' '; n--; }; this.messages.push(s); this.index = 0; this.timer = setInterval(function () { flashTitlePlayer.toggleTitle(); }, 1000); }, stop: function () { if (this.timer) { clearInterval(this.timer); this.action(this.title); delete this.timer; delete this.messages; } } }; function flashTitle(msg) { flashTitlePlayer.start(msg); } function stopFlash() { flashTitlePlayer.stop(); }flashTitle("start..");</script>
- 网页标题title的闪动提示
- 如何写一个网页标题title的闪动提示
- 如何写一个网页标题title的闪动提示
- 如何写一个网页标题title的闪动提示
- 如何写一个网页标题title的闪动提示 【转】
- 页面标题(title)闪动
- 页面title的闪动效果
- C# 获取网页标题title的代码
- RailsCase30 Pretty Page Title 动态变化的网页标题
- HTML+CSS基础 title标签改变网页的标题
- ANDROID获取WEBVIEW中网页的TITLE(标题)信息
- js 实现网站来消息网站标题闪动提示
- 一个JS函数搞定网页标题闪动效果
- title闪动效果
- 设置UIButton的title 闪动效果的解决办法
- 可以闪动的假消息提示代码
- 网页的标题标签(Title Tag)要怎么写才是最优化?
- 网页的标题标签(Title Tag)要怎么写才是最优化?
- MYSQL性能查看(命中率,慢查询)
- ajax技术 及 原理分析--转自网络
- linux大量文件的复制
- PHP面向对象之----static
- ARM linux系统调用的实现原理
- 网页标题title的闪动提示
- Android Wheel滚轮控件二级级联
- js字数限制 提示
- cookie--javascript记录用户之前是否访问本页面
- php调试技术文档
- js 数字逗号分节~
- php 数字逗号分节~
- 程序员的第三条职业通道
- IDE编译器netbeans 下载