Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p id="p1">Hello World!</p>
<script id="myScript" src="demo_async.js" async></script>

<p>Click the button to find out if the script was executed asynchronously as soon as it was available.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myScript").async;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy