HEADER ADS 728X90

How to use Javascript Message Function | Document.write , alert, confirm, prompt | JS Tutorial | By Codeprime

alert in javascript,confirm in javascript,prompt in javascript,console.log in javascript,javascript tutorial,learn javascript for beginners,javascript for beginners,alert in js,prompt in js,confirm js,javascript beginner,beginner js,javascript methods,prompt() method,console.log() method,javascript console.log,console in javascript,javascript console tricks,javascript in hindi,javascript console,javascript confirm,alert,alert javascript,wscube tech, codeprime, coding tutorial, how to learn coding easy way to learn coding

Hi dear welcome to "CodePrime" Blog . In this post YOU are going to learn Javascript Message Function | Document.write , alert, confirm, prompt | JS Tutorial. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat jmf.js file Then Copy The JS CODE and pest it then open the index.html file with your browser.

HTML CODE

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="/jmf.js"></script>
    <title>javascript</title>
</head>
<body>
    <!-- <h2>Javascript Tutorial</h2>
    <h3>By Codeprime</h3> -->

   
</body>
</html>

JAVASCRIPT CODE

//document example
document.write("code prime <br>")



//alert example

var a = alert("do you like our website ?");

document.write("thanks <br>");





//confirm example

var b = confirm("do you like our website ?");

if(b){
    document.write("Thank you<br>")

} else{
    document.write("sory to here that <br>")

}




//prompt example

var c = prompt("whats your name ?");

if(c){
    document.write("welcome" + " " + c + "<br>");

}else{
    document.write("sory to here that <br>" );

}


//<br> uses for line break all of message function you can do practice uing coment and uncoment of message parts.
 

Youtube Tutorial

FLOW US ON SOCIAL MEDIA

Post a Comment

0 Comments

Join Telegram