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
相关文档:
转载理由:短小精悍。
来源:互联网
一 Undefined 类型
只有一种值 undefined
以下三种情况typeof 返回类型为undefined
1. 当变量未初始化时
2. 变量未定义时
3. 函数无明确返回值时(函数没有返回值时返回的都是undefined)
undefined 并不等同于未定义的值
typeof 并不真正区分是否是未定义
看以下示例 ......
javascript中的null和undefined
本文装载网络,版权归原作者所有。
null :表示无值;
undefined : 表示一个未声明的变量,
或已声明但没有赋值的变量,
&nb ......
由于项目需要,用到其他项目组用VC开发的组件,在web后台代码无法访问这个组件,所以只好通过后台调用前台的javascript,从而操作这个组件。在网上找了找,发现有三种方法可以访问到前台代码:
第一种,OnClientClick (vs2003不支持这个方法)
<asp:Button ID="Button1" runat="se ......
<!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 ......
1、插入排序->直接插入法排序
function InsertSort(arr) { //插入排序->直接插入法排序
var st = new Date();
var temp, j;
for(var i=1; i<arr.length; i++) {
if((arr[i]) < (arr[i-1])) {
temp = arr[i];
j = i-1;
do {
arr[j+1] = arr[j];
j--;
}
whil ......