zoukankan
html css js c++ java
有段javascript代码很困惑,经过不断的查资料,终于弄懂了!呵呵!
Code
<
script type
=
"
text/javascript
"
>
var
date
=
new
Date();
function
initArray()
{
this
.length
=
initArray.arguments.length;
for
(
var
i
=
0
;i
<
this
.length;i
++
)
{
this
[i]
=
initArray.arguments[i];
}
}
var
d
=
new
initArray(
'
星期日
'
,
'
星期一
'
,
'
星期二
'
,
'
星期三
'
,
'
星期四
'
,
'
星期五
'
,
'
星期六
'
);
//
Firfox浏览器显示年是由getYear()获取当前年减去1900年
document.write((date.getYear()
>
1900
?
date.getYear():date.getYear()
+
1900
)
+
"
年
"
);
document.write(date.getMonth()
+
1
+
"
月
"
);
document.write(date.getDate()
+
"
日
"
);
document.write(d[date.getDay()]);
<
/
script>
因为JavaScript并不支援数组,所以要用下面的这段代码来定义初始化数组。
function initArray(){
this.length=initArray.arguments.length;
for(var i=0;i<this.length;i++){
this[i]=initArray.arguments[i];
}
}
查看全文
相关阅读:
Cassandra
【CISCO强烈推荐】生成树 《路由协议》 卷一二 拥塞:网络延迟 阻塞:进程中 MTU QS:服务质量 OSPF RIP ISIS BGP 生成树 《路由协议》 卷一二
m*n matrix min rank square matrix
Moving Computation is Cheaper than Moving Data
SASL mechanism
一阶 斜率 二阶 原函数的粗糙度 roughness
Linux 虚拟内存盘
Bloom Filters
R Tree
释放内存
原文地址:https://www.cnblogs.com/yangruipretty/p/1558912.html
最新文章
key object store
Lowest Common Ancestors
Traveling Saleman Problem
HDFS relaxes a few POSIX requirements to enable streaming access to file system data
exception_action
yarn_action
Kubernetes TensorFlow 默认 特定 集群管理器 虚拟化技术
Dominant Resource Fairness: Fair Allocation of Multiple Resource Types
RocksDB
Large-scale Incremental Processing Using Distributed Transactions and Notifications
热门文章
对外虚ip
nwr dynamo
Jeff Dean 排序时间计算
bmdiff snappy lzw gzip
哑变量 位图索引 列式存储
lru lirs
集群 有几个机架 每个机架 接入几台服务
combination_m_n
process_thread_action
对预测准确性的提升是以牺牲解释性为代价的
Copyright © 2011-2022 走看看