10.07.2017 Views

javascript_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 />

<br />

For instances of Date, toSource returns a string representing the source<br />

code.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript toSource Method<br />

<br />

<br />

<br />

var dt = new Date(1993, 6, 28, 14, 39, 7);<br />

document.write( "Formated Date : " + dt.toSource() );<br />

<br />

<br />

<br />

Output<br />

Formated Date : (new Date(743850547000))<br />

toString ()<br />

This method returns a string representing the specified Date object.<br />

Syntax<br />

The following syntax for toString () Method.<br />

Date.toString ()<br />

Return Value<br />

Returns a string representing the specified Date object.<br />

Example<br />

Try the following example.<br />

<br />

268

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

Saved successfully!

Ooh no, something went wrong!