Question: Design a HTML page to display a picture. The picture should be removed from the screen after a mouse click on the picture.
|
Output

Another Method to solve this
<html>
<body>
<img src="image.jpg" id="image" onclick="removeImage()">
<script>
function removeImage() {
// get the image element
var image = document.getElementById("image");
// remove the image from the page
image.parentNode.removeChild(image);
}
</script>
</body>
</html>
Output:
Image par click karke jarur dekhen
рдЗрд╕ html рдХोрдб рдоें рдЬाрд╡ाрд╕्рдХ्рд░िрдк्рдЯ рдХा рдЗрд╕्рддेрдоाрд▓ рдХिрдпा рдЧрдпा рд╣ै рдЬिрд╕рдоे рдПрдХ рдлंрдХ्рд╢рди рдмрдиाрдпा рдЧрдпा рд╣ै function(img) рдиाрдо рд╕े, рдЗрд╕рдоें рдЬाрд╡ाрд╕्рдХ्рд░िрдк्рдЯ рдХे рдЕрди्рджрд░ css рдЗрд╕्рддेрдоाрд▓ рдХिрдпा рдЧрдпा рд╣ै рдЬिрд╕े JavaScript DOM рдХрд╣рддे рд╣ै рдЗрд╕рдХा рдкूрд░ा рдиाрдо Document Object Model рд╣ोрддा рд╣ै।

0 Comments
Please don't Add spam links,
if you want backlinks from my blog contact me on rakeshmgs.in@gmail.com