JavaScript Events In Hindi

JavaScript Events In Hindi

JavaScript

JavaScript Events In Hindi Js Events Ka Istemal HTML Me Changes Ya Fir Effects Ko Dene Ke Liye Kiya Jata Hai, Ise Ham A to Z Understand Karne Wale Hai, JS Events Dene Ke Liye Js Functions Ka Istemal Kiya Jata Hai |

Also Read – JS Objects

JavaScript Events In Hindi

HTML Me Agar Kuch Bhi Extra Ya Fir Majedar Kuch Effect Ko Add Karna Ho To Wo Bina JS Ke Nhi Ho Sakti Hai, Isliye Me Aaj Kuch Majedar Events In Js Ke Bare Me Batane Ja Raha Hu |

JavaScript Me Events Bahut Type Ke Hote Hai, Lekin Ham Aaj 13 Important Js Events Ke Bare Me SIkhne Wale Hai |

Click (onclick) Event In Js in Hindi

Jab Hame HTML Body Ke Under Kahi Par Bhi Click Karwa Ke Kuch Text Ya Alert Ke Rup Me Kuch Dikhana Hota Hai, To Ham Js onclick Function Ka Istemal Karte Hai, Ye Function Click Hone Ke Bad Aapna Funtions Run Karta Hai Or Output Show Kar Deta Hai |

Example

<html>
  <head>
  </head>
  <body>
    <button onclick=func();>Click Me </button>
    <script>
      function func()
      {
        var a = prompt("Hello Bhai, Ye Kaise Website Hai ?");
        document.write(a)
      }
    </script>
  </body>
</html>

Aap Is Program Ko Aapne Computer Me Run Karke Dekh Sakte Hai, Or Fir Iska Output Bhi Dekh Sakte Hai, Waise Ye Program Keval Ek Button Click Me Hai, Jaise Hi Ham Click Me Button Par Click Karte Hai, To Ye Program func() Function Ko Call Karta Hai, Joku func() Functions Ke Under prompt() Hai, Jo Aapse Kuch Input Me Enter Kar Wayega Or Fir Click Me Jagah Wo Ouput Ko Print Kar Dega |

Double Click (ondblclick) Events In JS In Hindi

Jab Bhi Hame HTML Body Me Double Click Karwa Ke Kuch Actions Ko Perform Kar wana Hai To Aap ondblclick Functions Ka Istemal Kar Sakte Hai, ye Bhi Waise onclick Function Ki Tarah Hi Hai, Isme Keval Double Click Karna Hota Hai |

Example:

<html>
  <head>
  </head>
  <body>
    <p ondblclick=func();>Double Click Me </p>
    <script>
      function func()
      {
        alert("Thanks For Double Click Me");
      }
    </script>
  </body>
</html>

Jaise Hi Maine Double Click Me Par Double Click Kiya To, Fir Alert Me Thanks For Double Click Me Show Ho Gya, Kyoki Wo Hamne func() Functions Ke Under Likha Tha, Aap Iska Output Niche Dekh Sakte Hai |

Output:

Right Click (oncontextmenu) Events In Js In Hindi

Agar HTML Body Me Hame Kuch Right Click Kar Wane Ke Bad Kuch Actions Perform Kar Wana Hai, To Aap oncontextmenu Events Ka Istemal kar Sakte Hai |

Example:

<html>
  <head>
  </head>
  <body>
    <p oncontextmenu=func();>Right Click Me </p>
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Thanks For Right Click Me";
      }
    </script>
  </body>
</html>

Maine Yaha Par Ek Paragraph Banaya Hai, Or Jaise Hi maine Us par Click Kiya To, Fir func() Function Call Ho Kar Usne Dusre Paragraph Me Thanks For Right Click Me Insert Kar Diya, Waise Aap Iska Output Niche Bhi Dekh Sakte Hai |

Output:

Mouse Hover (onmouseenter) Events In Js In Hindi

Mouse Hove Ka Matlab Ye Hai, Ki Jab Bhi Hame Mouse Ko Kisi Bhi HTML Body Me Kahi Par Bhi Or Kisi Bhi Element Par Mouse Ko Lana Ho Yani Ki Hover Karna Ho, To onmouseenter Events Function ka Istemal Karke Aap Kuch Action Kar Wa Sakte Hai |

Example:

<html>
  <head>
  </head>
  <body>
    <p onmouseenter=func();>Mouse Hover </p>
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Ohh Bhai, Hover Ho Gaya Hai, Ab Mat Kro Plzz.. Haha";
      }
    </script>
  </body>
</html>

Aap Dekh Sakte Hai, Hamne Mouse Ko Jab Mouse Hover Paragraph Par Mouse ko Hover Karaya TO func() Functions Call Ho Gaya Or Usne Dusre Paragraph Me Text Ko Insert Kar Diya, Aap Iska Niche Output Bhi Dekh Sakte Hai |

Output:

Mouse Out (onmouseout) events In Js In Hindi

Jaise Ham Kisi Text Ya Fir Elements Par Mouse Le Jate Hai, Or Fir Waha Se Mouse Ko Hata te Hai, To Use Hi Mouse Out Kahte Hai, Matlab Ki Jab Bhi Mouse Ko Ham Us Elements Se Hatayenge To onmouseout events Call Ho jayega |

Example:

<html>
  <head>
  </head>
  <body>
    <p onmouseenter=func();>Mouse Out </p>
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Ohh Bhai, Ab Mouse Out Ho Gaya Hai, Ab Mat Kro Plzz.. Haha";
      }
    </script>
  </body>
</html>

Output:

Mouse Down (onmousedown) Events In JS In Hindi

Jab Bhi Ham Mouse Ko Down Karte Hai, To onmousedown events Call Ho Jata Hai |

Example:

<html>
  <head>
  </head>
  <body>
    <p onmousedown=func();>Mouse Down </p>
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Ohh Bhai, Ab Mouse Down Ho Gaya Hai, Ab Mat Kro Plzz.. Haha";
      }
    </script>
  </body>
</html>

Output:

Mouse UP (onmouseup) Events In Js In Hindi

Jab Bhi Ham Mouse up Karane Par Kuch Actions Karana Chahte Hai, To onmouseup events Ka Istemal Kiya Jata Hai |

Example:

<html>
  <head>
  </head>
  <body>
    <p onmouseup=func();>Mouse up </p>
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Ohh Bhai, Ab Mouse UP Ho Gaya Hai, Ab Mat Kro Plzz.. Haha";
      }
    </script>
  </body>
</html>

Output:

Key Press (onkeypress) Events In Js In Hindi

Jab Bhi Ham HTML Body Ke Under Koi Bhi Key Press Kar Wate Time, Kuch Action Perform Karna Hai To Aap onkeypress Or onkeyup Events Ka Istemal Kar Sakte hai, Ye KeyPress Events Body Ke Under Kaam Karta Hai Keval |

Example:

<html>
  <head>
  </head>
  <body onkeypress="func()">
    <p id="new"> </p>
    <script>
      function func()
      {
        document.getElementById("new").innerHTML = "Ohh Bhai, Don't Press Key,";
      }
    </script>
  </body>
</html>

Jaise Hi Ham Koi Bhi Key Press Karte Hai, To Ye func() Function Call Ho Jata Hai |

Output:

Others Events In Js In Hindi

Maine Kuch Events Ka Example Nhi Diya Hai, Kyoki ye Sare Events Ek Tarah Se Kaam Karte Hai, Lekin Fir Maine Inki Definition Ko Niche Likh Diya Aap Definition Ko Read Karke Function Ko Call Kar Sakte Hai |

  • Load (onload) – Iska Istemal Jab Karte Hai, Jab Page Ko Ham Load Karana Chahte Hai |
  • unload (onunload) – Iska Istemal Jab Karte Hai, Jab Page Ki WIndow Close Karte Hai, Tab unload Events Call Karta Hai |
  • Resize (onresize) – Iska Istemal Jab Karte Hai, Jaha Par Window Ko Resize Kiya Jata Hai Or Hame Waha Par Kuch Action Perform Karna Hota Hai |
  • Scroll (onscroll) – Iska Istemal Jab Kiya Jata Hai, Jaha Par Scroll Karne Par Hame Kuch Action Perform Karana Hota Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *