JavaScript defer

The defer is a Boolean value, used to indicate that script is executed after the document has been parsed. It works only with external scripts (i.e., works only when we are specifying the src attribute in

Syntax

Example

Here, we are using an external javascript file, i.e., myscript.js.

myscript.js

Test it Now

Output

After the execution of the above code, the output will be -

JavaScript defer
Next TopicJavaScript redirect




Hot Tutorials

Contact US

Email:[email protected]

JavaScript defer
10/30