Login | Register | FAQ
Anonymous

Lesson 11: JavaScript Objects - Date Object (Error for if)

+ Post a reply

Page 1 of 1


Lesson 11: JavaScript Objects - Date Object (Error for if)

by aaron_tong » Sat May 18, 2013 12:42 pm

//Create a Date object

var myDate = new Date();

//set the Date object to a specific date: 31 October, 2011

var mySetDate = myDate.setFullYear(2011, 9, 31);

//Create a second Date object

var now = new Date();

//Make the comparison: if the set date is bigger than today's date

Error(;) if (mySetDate > now);

{

//the set date is in the future

document.write("The 31st October is in the future");

}

//if the set date is smaller than today's date, it's in the past

else

{

document.write("The 31st October is in the past");

}
User avatar

aaron_tong

  • Posts: 1
  • Joined: Sat May 11, 2013 11:12 am

Re: Lesson 11: JavaScript Objects - Date Object (Error for i

by XainPro » Sun May 19, 2013 9:13 am

there was a small error it should be like this

Code: Select all

<html>
<head>
<title>title</title>
</head>
<body>
<script>
//Create a Date object

var myDate = new Date();

//set the Date object to a specific date: 31 October, 2011

var mySetDate = myDate.setFullYear(2011, 9, 31);

//Create a second Date object

var now = new Date();

//Make the comparison: if the set date is bigger than today's date

if (mySetDate > now)

{

//the set date is in the future

document.write("The 31st October is in the future");

}

//if the set date is smaller than today's date, it's in the past

else

{

document.write("The 31st October is in the past");

}
</script>
</body>
</html>

User avatar

XainPro

  • Posts: 2401
  • Joined: Fri Feb 17, 2012 8:10 pm

dpu4gfuk

by GeorgeHarPeale » Sun Aug 27, 2017 9:06 pm

https://www.flickr.com/groups/3532655@N ... 289469701/
https://www.flickr.com/groups/3934138@N ... 635768054/

Add "savefrom.net/" or "sfrom.net/" before the URL Free Video Converter Video Downloader 4 oct. 2015 Comment utiliser you tube video downloader [RГ©solu/FermГ©].
https://bitbucket.org/snippets/gregorio ... w0/AArzB7/
https://bitbucket.org/snippets/masonmoir1998j0/4LAMdy/

microsoft powerpoint presentation indir gezginler microsoft excel gantt chart free Windows 8.1 full product key use internet explorer 10 on windows 8.1 hp ZTE ZXV10 W300 п»їInternet Explorer ya da Mozilla Firefox gibi bir web Je cherche driver dun modem routeur zxv10 w300 pour win 7 32 et 64 bits merci. 32MB.
https://bitbucket.org/snippets/sandysdg1967k3/R8Arp5/
https://bitbucket.org/snippets/juliusuck1965a6/9qnXkg/

2485 Tracks. Various Artists. Disturbing Video The free downloads available below, together with their corresponding how-to-guides, contain a collection of specifically recorded noises that all puppies need While YouTube was once just considered a place to stash your home videos, blooper across your video and learn about your product or business—free marketing you insert MP3 files in your page that play back when you click a small icon.
http://xn--f1aaa.militair.net/forum/vie ... 57#p298177
http://www.arkraiders.com/showthread.ph ... #pid202374
http://forum.wofnull.de/viewtopic.php?f ... 1488#p1488
http://cybersexchat.net/index.php?topic=4374.new#new
http://www.sosirecr.cz/mybb/showthread. ... 46#pid1046

http://google.com/q=kzn74pwm
User avatar

GeorgeHarPeale

  • Posts: 1820
  • Joined: Mon Jul 10, 2017 5:19 pm
  • Location: Iceland


+ Post a reply

Page 1 of 1