javascript获得明天的日期
<script language="javascript" type="text/javascript">
var fullDate23=new Date();
var dateString22=new Date(fullDate23.getYear(),(fullDate23.getMonth()),fullDate23.getDate());
var dateString23=new Date(dateString22.valueOf()+1*24*60*60*1000);"&vbcrlf&_
var showDateString1=dateString22.getYear()+"-"+(dateString22.getMonth()+1)+"-"+dateString22.getDate();"
var showDateString2=dateString23.getYear()+"-"+(dateString23.getMonth()+1)+"-"+dateString23.getDate();
showDateString1,为今天的日期,而shwoDAteString2就是明天的日期了,似乎很简单,但是它里边也有好多角落需要我们共同研究!
相关文档:
认清JavaScript和JAVA全局变量和局部变量的作用域
2010年2月28日 george 发表评论 阅读评论
通过淘宝面试题来认清JavaScript和JAVA全局变量和局部变量的作用域
注意两者是有严重区别的!
var a = 100;
function testResult(){
var b = 2 * a;
var a = 200;
var c = a / 2 ......
在看了W3C的关于ECMScript的对象及继承后,先是完成贪吃蛇的实现。最近又抽空实现了下俄罗斯方块。对于俄罗斯方块重要的不是游戏本身,而是在这个过程中对于javascript继承的使用。
当然在一些对象的划分及使用过程还存在瑕疵,算法也不算最优,发布出源码只是想做个交流。以下就提供源代码供大家参考,也为自己做个备份。 ......
1. 某些基类如果不直接使用,而仅仅只是用于给子类提供通用的函数,这种情况下,基类被看作抽象类.
2. 在 javascript 的类中所有的方法和属性都是"公用的".
3. javascript 中的继承并不是明确规定的,而是通过模仿来实现的.有以下方法:
(1). 对象冒充
function A(sColor){
this.color = sColor;
this.showColo ......
with(document)
{
write ("test");
write
("dsasfda");
}
上面是用了with
如果不用的话就要这样写了
document.write (" ......
javascript页面跳转常用代码
按钮式:
<INPUT name="pclog" type="button" value="GO" onClick="location.href='http://www.163.com'">
或者
<input type="button" value="重新购买" onclick="return goBack ......