📄 news-scroller.html
字号:
<!-- 安装 滚动告示板 的三个步骤:
1. 把以下数据复制到你的Html文件的Head标记下
2. 在Body标记加上OnLoad语句
3. 然后把最后一部分加到Body标记内 -->
<!-- 步骤一: 把以下数据复制到你的Html文件的Head标记下 -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!-- 开始
// change this to where you store the blank.gif image
var blank = "blank.gif";
topedge = 130; // 告示板的上边距
leftedge = 10; // 告示板的左边距
boxheight = 150; // 告示板的高度
boxwidth = 210; // 告示板的宽度
scrollheight = 240; // 滚动文字块的高度
function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 150);
}
// 结束 -->
</script>
</HEAD>
<!-- 步骤二: 在Body标记加上OnLoad语句 -->
<BODY OnLoad="scrollnews(0)">
<!-- 步骤三: 然后把最后一部分加到Body标记内 -->
<div ID="news" style="position:absolute; visibility:hidden;
top:1; left:1; height:600;
clip:rect(10,100,100,10); border-width:0px;">
<table border=0 cellpadding=1 cellspacing=0 bgcolor="white">
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
<tr>
<td>
<!-- 你的广告信息 -->
如何购书?<br>①可以上各地新华书店选购。<br>②可以直接向我社邮购。<br><p>邮购方法:<br>购书10元以下,加收挂号邮费<br>2元;购书10元以上,加收所购<br>书款15%的挂号邮费。将需购图<br>书的书价另加挂号邮费汇至我<br>社邮购部,并注明网上购书。<br>请务必写清汇款人的姓名、地<br>址、邮编及所购书名。<br><p>邮购汇款地址:<br>上海市瑞金二路450号<br>上海科<br>学技术出版社邮购部。<br>邮编:200020<br>电话:021-64736055×2016。<br>
<br>
<a href="mailto:sstp450@sh163.net">sstp450@sh163.net</a>
<!-- 广告信息结束 -->
</td>
</tr>
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
</table>
</div>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -