TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Create The Prompt Window In Alert Box Using Java Script
Delpin Susai Raj
Aug 23
2016
Code
674
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<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