Javascript实现滚动新闻
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>滚动新闻类</title>
<style type="text/css">
body {
text-align:center;
}
td {
font-size:12px;
line-height:20px;
text-align:left;
}
.marquee {
width:100%;
height:100%;
overflow:hidden;
}
.m {
height:20px;
}
.m2 {
height:90px;
}
</style>
</head>
<body>
<table border='1'>
<tr>
<td height='20' width='250'><div id='marquee1' class='marquee m'></div></td>
<td height='20' width='300'><div id='marquee2' class='marquee m'></div></td>
</tr>
<tr>
<td height='99' colspan='2'>基本上够用了吧!</td>
</tr>
<tr>
<td height='90' colspan='2'><div id='marquee3' class='marquee m2'></div></td>
</tr>
</table>
<script language="JavaScript">
function BYMarquee(){
this.Content = []; //显示内容
this.Speed = 20; //上移速度
this.Object = {}; //marquee容器对象
this.Pause = true; //是否停留
this.Start = function(){
var o = this.Object;
&nbs
相关文档:
在JavaScript中利用document.referrer可以获得跳转前上一页的地址,其实在诸如Asp,PHP等语言中都可以获得这个参数,只不过写法不同,然后可以判断是哪里来的请求从而做一些处理.但是JS中的document.referre只能获得<a>标签传过来的参数.看代码
a.html
<html>
<head>
<title>测试</title> ......
转载理由:短小精悍。
来源:互联网
一 Undefined 类型
只有一种值 undefined
以下三种情况typeof 返回类型为undefined
1. 当变量未初始化时
2. 变量未定义时
3. 函数无明确返回值时(函数没有返回值时返回的都是undefined)
undefined 并不等同于未定义的值
typeof 并不真正区分是否是未定义
看以下示例 ......
<!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></head>
<body>
<mce:style type="text/css"><!--
.tab ......
今天在做一个学生信息修改页面的时候遇到了一点小问题,因需求指出学生在查看个人信息时可以申告其中的错误信息,并提交正确信息,所以我在显示基本信息的时候对于学院、专业和班级等就采用了下拉菜单,为了使下拉菜单显示学生当前的信息,且具有联动效果需在js中获取session中传过来的相 ......
通过分析各类浏览器的userAgent信息,不难得出分辨各类浏览器及其版本的正则表达式。而且,对浏览器类型的判断和版本的判断完全可以合为一体地进行。于是,我们可以写出下面的代码:
<script type="text/javascript">
  ......