Layout Options

  • Fixed Header
    Makes the header top fixed, always visible!
  • Fixed Sidebar
    Makes the sidebar left fixed, always visible!
Set Second

Description

The setSeconds() method sets the seconds (from 0 to 59), according to local time.

This method has the form:

Date.setSeconds(sec,millisec)
Parameter Description
sec (required) An integer between 0 and 59 representing the seconds
millisec (optional) An integer between 0 and 999 representing the milliseconds

Examples

The following example shows the basic use of this method.

<script>
var d = new Date();
d.setSeconds(1);
document.write(d);
</script>

This produces the following result:

Browser Support

Firefox IE Chrome Opera Safari