Please login to start chat

ICT Solutions 2020-03-19 16:20:00
Category : JavaScript Tutorials

JavaScript Outputs

<!DOCTYPE html>
<html>
<head>
<title>JavaScript OutPut</title>
</head>
<body>
<p>alert</p>
<button type = "button" onclick = "jsAlert()">Try Now</button>

<p>console.log</p>
<button type = "button" onclick = "jsConsole()">Try Now</button>

<p>document.write</p>
<button type = "button" onclick = "jsWrite()">Try Now</button>

<p id = "demo">innerHTML</p>
<button type = "button" onclick = "jsInner()">Try Now</button>

<p>Window Print</p>
<button type = "button" onclick = "jsPrint()">Print Now</button>

<script>
function jsAlert(){
alert("Window Alert in JavaScript OutPut");
}

function jsConsole(){
console.log("Console Log in JavaScript OutPut");
}

function jsWrite(){
document.write("document.write in JavaScript OutPut");
}

function jsInner(){
document.getElementById("demo").innerHTML = "inner.html in JavaScript OutPut";
}

function jsPrint(){
window.print("Window Print in JavaScript OutPut");
}
</script>
</body>
</html>

Comments:

No comment to show.

Available Services
Download Android Application