
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set the script to be executed asynchronously in HTML?
Use the async attribute to set the script to execute asynchronously as and when it is available. It only uses the external script.
Firstly, add a js file. Let us give it a name, new.js,
function sayHello() { alert("Hello World") }
Let’s add the HTML code now and execute the above script −
<html> <head> <script src = "new.js" ></script> </head> <body> <p>This is demo text.</p> </body> </html>
- Related Questions & Answers
- How to obtain the time taken for a method to be executed in TestNG?
- Execute a script when the document is about to be unloaded in HTML?
- How to set that the text direction will be submitted in HTML?
- How to set the range that is considered to be of high value in HTML?
- What are the different ways the transaction can be executed(DBMS)?
- How to make graphics with a script in HTML?
- How to set that the specified element/group of elements should be disabled in HTML?
- How to execute the script when the page has finished parsing in HTML?
- How do we set an image to be shown while the video is downloading in HTML?
- How do we set the range that is considered to be of low value in HTML?
- How to set the name of the element in HTML?
- Call a method Asynchronously in C#
- How to Re-run Last Executed Commands in Linux?
- How to set text direction in HTML?
- How to set cell padding in HTML?
Advertisements