JavaScript特效:时间倒数
var Tid;
var SetTime=4*60*60*1000; //设置毫秒数,1000毫秒为1秒
function LTime(){
var MyDiv=document.getElementById("mydiv");
var Time,TempTime,Days,Hours,Minutes,Seconds;
SetTime-=1000;
if (SetTime<(60*1000)){ //当小于1分钟
Seconds=Math.floor(SetTime/1000);
Time=Seconds+"秒";
}
else if (SetTime<(60*60*1000)){ //当小于1小时
Minutes=Math.floor(SetTime/(60*1000));
TempTime=SetTime-(Minutes*60*1000);
Seconds=Math.floor(TempTime/1000);
Time=Minutes+"分"+Seconds+"秒";
}
else if (SetTime<(24*60*60*1000)){ //当小于1天
Hours=Math.floor(SetTime/(60*60*1000));
TempTime=SetTime-(Hours*60*60*1000)
Minutes=Math.floor(TempTime/(60*1000));
TempTime=TempTime-(Minutes*60*1000);
Seconds=Math.floor(TempTime/1000);
Time=Hours+"小时"+Minutes+"分"+Seconds+"秒";
}
else if (SetTime>
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
<a href='javascript:add();'>添加</a>
<a href='javascript:del();'>删除</a>
<table width=300 id=tbl>
<tr style='display:none;'><td>11111111111111</td></tr>
<tr style='display:none;'><td>22222222222222</td></tr>
<tr s ......
用call方法实现继承
function classA(sColor){
this.color=sColor;
this.sayColor=function(){
alert(this.color);
......
<!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>
<meta http-equiv="Content-Type" content="text/html;&n ......
前台利用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 ......