# number setTimeout(function callback, number delay, any rest)

Sets a timer to execute a registered callback function after the set time.

# Parameters

# function callback

Callback function

# number delay

The time delay (in ms). The function is called after the specified delay.

# any rest

param1, param2, ..., paramN and other additional parameters to be passed to the callback function.

# Return value

# number

The timer number. You can pass this value to clearTimeout to cancel the timer.

点击咨询小助手