资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
Discuz 公告效果(自动换行,无间隙滚动)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=gbk"> <style type="text/css"> ul { padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px } #announcement { width:100%; background:url(img/menu_bg.gif) repeat; overflow: hidden; } #announcement div { border: #e6e6e6 1px solid; padding:0px 10px 0px 10px; overflow-y:hidden; line-height: 24px; height: 24px } #announcement li { font-size: 12px; float: left; list-style-type: none; margin-right: 20px; padding-left: 10px; background: url(img/arrow_right.gif) no-repeat 0px 50%; white-space: nowrap } #announcement a { text-decoration: none; } #announcement a:hover { text-decoration:underline; } </style> </HEAD> <BODY> <DIV id=announcement onMouseOver="if(!anncount) {clearTimeout(annst);annst = 0}" onMouseOut="if(!annst) annst = setTimeout('announcementScroll()', anndelay);"> <DIV id=announcementbody> <UL> <LI><A href="http://hi.baidu.com/mimimo/blog/item/0f4ab6defbf1b65fccbf1ada.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F0f4ab6defbf1b65fccbf1ada.html" target="_blank">分享个表单验证函数</A>(2008-12-16 05:30 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/d6b9543ddf2739e93d6d9798.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2Fd6b9543ddf2739e93d6d9798.html" target="_blank">块级元素和级联元素的含义</A>(2008-12-13 03:39 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/5cc8a31ed1749d1841341796.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F5cc8a31ed1749d1841341796.html" target="_blank">如何设置<span>的width属性且不换行??</A>(2008-12-13 03:23 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/11bf1b174322d9064a90a788.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F11bf1b174322d9064a90a788.html" target="_blank">执行javascript后,gif动画就静止了??</A>(2008-12-13 03:12 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/67424f901f46308aa977a4f5.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F67424f901f46308aa977a4f5.html" target="_blank">基于栅格地图的查询系统(切片缓存技术)</A>(2008-11-29 07:38 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/b5230933b495d5ff1b4cff78.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2Fb5230933b495d5ff1b4cff78.html" target="_blank">【转】flash和javascript之间的通讯(javascript调用flash中的函数)</A>(2008-11-27 07:45 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/07bad22a214e132ad42af106.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F07bad22a214e132ad42af106.html" target="_blank">不使用循环和回调函数输出字符1~100</A>(2008-11-23 03:00 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/acc8421005e1fbfbc2ce795a.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2Facc8421005e1fbfbc2ce795a.html" target="_blank">简洁的js图片等比缩放</A>(2008-11-22 04:54 P.M.)</LI> <LI><A href="http://hi.baidu.com/mimimo/blog/item/2940948f875a27fd503d9265.html" _ewebeditor_ta_href="http%3A%2F%2Fhi.baidu.com%2Fmimimo%2Fblog%2Fitem%2F2940948f875a27fd503d9265.html" target="_blank">分贝网音乐地址获取器</A>(2008-11-20 05:19 P.M.)</LI> </UL> </DIV> </DIV> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%20%0D%0Afunction%20%24(id)%20%0D%0A%7B%20%0D%0Areturn%20document.getElementById(id)%3B%20%0D%0A%7D%20%0D%0Avar%20anndelay%20%3D%203000%3B%20%0D%0Avar%20anncount%20%3D%200%3B%20%0D%0Avar%20annheight%20%3D%2024%3B%20%0D%0Avar%20annst%20%3D%200%3B%20%0D%0Afunction%20announcementScroll()%20%0D%0A%7B%20%0D%0Aif(%20!%20annst)%20%0D%0A%7B%20%0D%0A%24('announcementbody').innerHTML%20%2B%3D%20'%3Cbr%20style%3D%22clear%3A%20both%22%20%2F%3E'%20%2B%20%24('announcementbody').innerHTML%3B%20%0D%0A%24('announcementbody').scrollTop%20%3D%200%3B%20%0D%0Aif(%24('announcementbody').scrollHeight%20%3E%20annheight%20*%203)%20%0D%0A%7B%20%0D%0Aannst%20%3D%20setTimeout('announcementScroll()'%2C%20anndelay)%3B%20%0D%0A%7D%20%0D%0Aelse%20%0D%0A%7B%20%0D%0A%24('announcement').onmouseover%20%3D%20%24('announcement').onmouseout%20%3D%20null%3B%20%0D%0A%7D%20%0D%0Areturn%3B%20%0D%0A%7D%20%0D%0Aif(anncount%20%3D%3D%20annheight)%20%0D%0A%7B%20%0D%0Aif(%24('announcementbody').scrollHeight%20-%20annheight%20%3C%3D%20%24('announcementbody').scrollTop)%20%0D%0A%7B%20%0D%0A%24('announcementbody').scrollTop%20%3D%20%24('announcementbody').scrollHeight%20%2F%202%20-%20annheight%3B%20%0D%0A%7D%20%0D%0Aanncount%20%3D%200%3B%20%0D%0Aannst%20%3D%20setTimeout('announcementScroll()'%2C%20anndelay)%3B%20%0D%0A%7D%20%0D%0Aelse%20%0D%0A%7B%20%0D%0A%24('announcementbody').scrollTop%20%2B%2B%20%3B%20%0D%0Aanncount%20%2B%2B%20%3B%20%0D%0Aannst%20%3D%20setTimeout('announcementScroll()'%2C%2010)%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0AannouncementScroll()%3B%20%0D%0A%3C%2Fscript%3E"> </BODY> </HTML>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程