JavaScript特效:间隔滚动图片
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>间隔滚动图片</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="Dreamweaver8" />
<meta name="Author" content="枫叶随风 QQ:455948725 E-mail:liukun615@126.com" />
<link rel="shortcut icon" href="http://www.fengyekun.com/favicon.ico" />
<style type="text/css">
<!--
body {font-family:"宋体", Arial, Helvetica, sans-serif; margin:0px; font-size:12px;}
h1 {margin:0px; height:95px; line-height:95px; color:#ff0000; text-align:center; font-size:20px; font-weight:bold;}
#main {width:100%;}
#content {position:relative; top:50%; margin:-150px auto; width:500px; height:300px; border:1px solid #999; background:#eee;}
#mydiv {margin:0px auto; width:120px; height:90px; border:10px solid #fff; white-space:nowrap; overflow:hidden;}
#mydiv img {width:120px; height:90px;}
#demo1,#demo2 {display:inline;}
-->
</style>
<script language="javascript">
var Tid;
function MarqueeImage(){
var demo1 = document.getElementById("demo1");
var demo2 = document.getElementById("demo2");
var mydiv = document.getElementById("mydiv");
var AreaWidth=120; //这里的值要跟内容显示区域宽度一样,这里是跟显示的图片宽度一样。
var Speed=10 //内容区域滚动的速度
 
相关文档:
本文是对《AJAX动态网页信息提取原理》
的补充,前文总结了两种AJAX网页文字的抓取方法:
网页文字在加载HTML文档(document)的时候用Javascript代码获取和展现,此Javascript代码在发送load事件之前运行,那么接收到load事件表示所有的内容都加载完了
网页文字在加载完HTML文档(document)后在某个时刻用Javascript ......
1、直接在前台调用 javascript 函数
很简单,在 head 元素之间加入 script 元素,将 type 元素设置为 " text/javascript "
如:
<head runat="server">
<mce:script type="text/javascript" ><!--
function ShowName(str)
{
alert("您的名字为:("+str+")");
}
// --></mce:script>
< ......
1.document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementById( "表单中元素的ID號 ").name(或value)
6 ......
前台利用javascript解析Json数据,生成编码折线,因为利用浏览器解析,数据量大的情况下,会锁定浏览器,脚本执行太慢。
package unit;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.sql.SQLException;
import java.util.A ......