01
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
02
<html xmlns=
"http://www.w3.org/1999/xhtml"
03
04
<
head
05
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
06
<title>让网页的Title标题文字滚动显示效果</title>
07
</
08
09
<body bgcolor=
"#ffffff"
onload=
"newtext()"
10
<script language=javascript>
11
var text = document.title
12
var timerID
13
14
function
newtext() {
15
clearTimeout(timerID)
16
document.title = text.substring(1, text.length) + text.substring(0, 1)
17
text = document.title.substring(0, text.length)
18
timerID = setTimeout(
, 100)
19
}
20
</script>
21
</body>
22
23
</html>
<meta charset=
"UTF-8"
<title>JS实现title标题闪烁提示信息</title>
<body>
<script
type
=
"text/javascript"
_record = 0;
var myTitle = document.title;
titleBlink() {
_record++;
if
(_record == 3) { //当变量_record累加到3是,将其赋值为1。相当于无限循环。
_record = 1;
(_record == 1) {
document.title =
'【 】'
+ myTitle;
(_record == 2) {
'【新消息】'
setTimeout(
"titleBlink()"
, 500); //调节时间,单位毫秒。
24
titleBlink();
25
26
27
28
29
上一篇:怎么拿到input file上传的文件名字显示到页面中
下一篇:官网保护工具如何通过申请?