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
Mas
NA
478
71.1k
How can perform click event on one image
Feb 24 2020 8:35 PM
Hello Members,
Here i am add the click event on one image, But we can perform click event for all the images, If we are clicking on one image, other two images we no need to get the chance of click event and how to add the tooltip on image..
<li><img id=
"inImage"
src=
"inempty.png"
onclick=
"change()"
height=
"40"
width=
"40"
/>
<img id=
"noImage"
src=
"noempty.png"
onclick=
"change1()"
height=
"40"
width=
"40"
/>
<img id=
"passImage"
src=
"passempty.png"
onclick=
"change2()"
height=
"40"
width=
"40"
/></li>
<script type=text/javascript>
var
image = document.getElementById(
"inImage"
);
function
change() {
if
(image.src.match(
"infilled.png"
)) {
image.src =
"inempty.png"
;
}
else
{
image.src =
"infilled.png"
;
}
}
var
image1 = document.getElementById(
"noImage"
);
function
change1() {
if
(image1.src.match(
"nofilled.png"
)) {
image1.src =
"noempty.png"
;
}
else
{
image1.src =
"nofilled.png"
;
}
}
var
image2 = document.getElementById(
"passImage"
);
function
change2() {
if
(image2.src.match(
"passfilled.png"
)) {
image2.src =
"passempty.png"
;
}
else
{
image2.src =
"passfilled.png"
;
}
}
</script>
Reply
Answers (
1
)
C# VS2017 WPF : fail to create draw movement on form
How update Chines Character in Asp.net Application ?