请问为什么这些javascript代码无法执行
<html><body><scripttype="text/javascript">varminutes=1000*60varhours=minutes*60varday...
<html>
<body>
<script type="text/javascript">
var minutes = 1000*60
var hours = minutes*60
var days = hours*24
var years = days*365
var d = new Date()
var t = d.getTime()
var y = t/years
var bir=new Date("1980/12/26 06:00:00")
var sec=bir.getTime()
var yea=sec/days
var now01=t-sec //如果我将这里面的变脸名称从now01修改成为now下面document.write()也修改成为document.write(now)就可以正常运行,但是只要用其他的单词就不可以,请问这是为什么呢?
var myday=now/days
document.write("It's been: " + y + " years since 1970/01/01!")
document.write("</br>")
document.write(now01)
</script>
</body>
</html> 展开
<body>
<script type="text/javascript">
var minutes = 1000*60
var hours = minutes*60
var days = hours*24
var years = days*365
var d = new Date()
var t = d.getTime()
var y = t/years
var bir=new Date("1980/12/26 06:00:00")
var sec=bir.getTime()
var yea=sec/days
var now01=t-sec //如果我将这里面的变脸名称从now01修改成为now下面document.write()也修改成为document.write(now)就可以正常运行,但是只要用其他的单词就不可以,请问这是为什么呢?
var myday=now/days
document.write("It's been: " + y + " years since 1970/01/01!")
document.write("</br>")
document.write(now01)
</script>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询