javascript程序编程

来源:百度知道 编辑:UC知道 时间:2024/05/21 10:35:26
题目:在页面的一个矩形容器中,显示若干条自下向上循环滚动的新闻标题。当鼠标光标移入容器时,新闻标题停止滚动,鼠标光标移出容器时,新闻标题继续滚动。每个新闻标题均可链接到某个新闻内容页面(URL可以虚构)。超链接默认没有下划线,当鼠标光标移到链接上时显示下划线。

这个好说,用CSS+marquee就可以了,代码如下:

<html>
<head>
<style type="text/css">
<!--
A:link{font-weight:normal; color:#000000; font-size:12px; text-decoration:none; font-family:宋体}
A:visited{font-weight:normal; color:#858585; font-size:12px; text-decoration:none; font-family:宋体}
A:hover{font-weight:normal; color:#ff0000; font-size:12px; text-decoration:underline; font-family:宋体}
-->
</style>
</head>
<body>
<table width="20%" align=center border=1><tr><td>
<marquee direction=up TrueSpeed scrollAmount=1 scrollDelay=40 width=100% height=140 onMouseOut=Javascript:this.start(); onMouseOver=Javascript:this.stop(); >
<table align=center>
<tr><td><a href="http://www.126.com">网易126邮箱</a></td></tr>
<tr>&l