JavaScript 时间加减 改变
JavaScript 时间加减:
<HTML>
<BODY>
<script type="text/javascript">
var time = new Date("04/30/2010");
document.write(time);
document.write("<br>");
//plus two days
var haomiao = time.getTime() +2*24*60*60*1000;
var plustime = new Date(time.setTime(haomiao));
document.write(plustime);
</script>
</BODY>
</HTML>
JavaScript 时间改变:
<HTML>
<HEAD>
</HEAD>
<BODY>
<script type="text/javascript">
//now time
var nowtime = new Date();
document.write(nowtime);
document.write("<br>");
//change time
var changetime = new Date(nowtime.setYear("1987"));
changetime = new Date(nowtime.setMonth("7"));
changetime = new Date(nowtime.setDate("16"));
document.write(changetime);
document.write("<br>");
</script>
</BODY>
</HTML>
相关文档:
注:页面上元素name属性和JavaScript引用的名称必须一致包括大小写
否则会提示你一个错误信息 "引用的元素为空或者不是对象"
---------------------------------------------------------------------
对象属性
document.title ......
以下事例为结合本人电脑而设计的参数,您也可改为自己的尺寸
<SCRIPT LANGUAGE="JavaScript">
var chicun;
chicun=screen.width;
if(chicun==1280||chicun==1440||chicun==1600)
{
<!--
function initEcAd() {
document.all.AdLayer1.style.posTop = -100;
document.all.AdLayer1.style.visibility = 'vis ......
基本上全部加了注释,一行一注....呵呵
<!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>
<mce:style type="text/css"&g ......
最近要用到相关技术,先贴在这,有空再翻页。
本文转自:
http://www.codeguru.com/Cpp/I-N/ieprogram/article.php/c4399
http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4399/JavaScript-Calls-from-C.htm
http://www.codeproject.com/KB/COM/jscalls.aspx
Introduction
Sometimes, when we are usi ......