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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kwasi Denkyira
1.6k
197
14.9k
How to pop up an Image from html as an alert
May 5 2021 7:40 PM
I have an html page with an image src and I want to pop up the image on page first load in mvc layout . I am struggling to get the popup working. Below is my html code
<!DOCTYPE html>
<html>
<head>
<title>CUI Page</title>
<meta charset=
"utf-8"
/>
<script src=
"/Scripts/jquery-1.10.2.min.js"
></script>
<link href=
"/Content/bootstrap.min.css"
rel=
"stylesheet"
/>
<script src=
"/Scripts/bootstrap.min.js"
></script>
</head>
<body>
<div
class
=
"container"
>
<div
class
=
"col-md-12"
id=
"hide"
>
<img src=
"/Content/Images/warning.png"
style=
"margin-left: auto; margin-right: auto; display: block;"
alt=
""
/>
<button autofocus id=
"myButton"
type=
"button"
style=
"margin-left: auto; margin-right: auto; display: block;"
>OK</button>
</div>
</div>
</body>
</html>
<script>
$(
"#myButton"
).on(
'click'
, function () {
$(
"#hide"
).hide();
</script>
Reply
Answers (
3
)
Convert string of list into integer.
Uncaught ReferenceError: require is not defined