Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create The Prompt Window In Alert Box Using Java Script
WhatsApp
Delpin Susai Raj
Aug 23
2016
770
0
0
<html>
<head>
<script type=
"text/javascript"
>
function
disp_prompt()
{
var
name=prompt(
"Please enter your name"
,
"Harry Potter"
);
if
(name!=
null
&& name!=
""
)
{
document.write(
"Hello "
+ name +
"! How are you today?"
);
}
}
function
disp_alert()
{
alert(
"Hai Buy!!!"
);
}
onload=alert(
"Hai Welcome"
);
</script>
</head>
<body onunload=
"disp_alert()"
>
<input type=
"button"
onclick=
"disp_prompt()"
value=
"Display a prompt box"
/>
</body>
</html>
java script
alert
message
prompt
window
Up Next
Create The Prompt Window In Alert Box Using Java Script