易截截图软件、单文件、免安装、纯绿色、仅160KB

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>


相关文档:

javascript 动态添加事件


<html xmlns="http://www.w3.org/1999/xhtml" >
<head >
    <title></title>
</head>
<body>
       
    <form id="form1">
    <div>
  & ......

ATL与JavaScript交互

原帖地址:http://www.followman.com/bbs/Topic-B11-T262.aspx
JavaScript动态响应ATL事件
相关讨论:http://topic.csdn.net/t/20061012/21/5078729.html

点:脚本传过来的对象是IDispatch接口,应该用IDispatch::Invoke来调用。如果传过来的是个function,那么DISPID
为0,如果是个对象,那么要先用GetIDsOfNames得 ......

javascript 获取服务器时间

当需要在网页中显示时间时可以用到下面这段代码:
<SCRIPT language=JavaScript type=text/JavaScript>
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate(); ......

javascript集锦,各个元素说明

javascript集锦
javascript数组操作汇总
 
javascript动态创建form表单 和 节点控制说明
动态读取
javascript:function ctys(_ctag){
ctys1=document.createElement(_ctag);
document.body.appendChild(ctys1);
return ctys1
};
newE1=ctys('<TEXTAREA id=www>');
newE1.cols='150';
newE1.rows='30 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号