Important Notice:

Popup Boxes

Popup Boxes

46 views 1 min read

Popup Boxes:-

JavaScript में तीन प्रकार के popup बॉक्स होते हैं, जो यूजर के साथ इंटरैक्ट करने के लिए उपयोग किए जाते हैं:

  1. alert() – केवल सूचना देने के लिए
  2. confirm() – यूजर से हाँ/नहीं में जवाब लेने के लिए
  3. prompt() – यूजर से इनपुट (टेक्स्ट) लेने के लिए

नोट: इन सभी मेथड्स को window.alert(), window.confirm(), window.prompt() लिखा जा सकता है। window को छोड़कर भी सीधा लिख सकते हैं।

Popup Boxes:-

JavaScript has three types of popup boxes that help you interact with the user:

  1. alert() – just to show a message
  2. confirm() – to ask the user for a Yes/No answer
  3. prompt() – to let the user type something (like their name or age)

Note: You can write these methods as window.alert(), window.confirm(), window.prompt() or directly alert(), confirm(), prompt().

Related Notes