10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

Try the following example.<br />

<br />

<br />

JavaScript getHours Method<br />

<br />

<br />

<br />

var dt = new Date("December 25, 1995 23:15:00");<br />

document.write("getHours() : " + dt.getHours() );<br />

<br />

<br />

<br />

Output<br />

getHours() : 23<br />

getMilliseconds()<br />

Javascript date getMilliseconds() method returns the milliseconds in the<br />

specified date according to local time. The value returned by getMilliseconds is<br />

a number between 0 and 999.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.getMilliseconds ()<br />

Return Value<br />

Returns the milliseconds in the specified date according to local time.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript getMilliseconds Method<br />

<br />

231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!