Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 626 Bytes

14-popupboxes.md

File metadata and controls

33 lines (22 loc) · 626 Bytes

window.alert

yaha ak alert box declear karta hain.

  • for example:
alert("hello world");

prompt.alert

prompt.alert me ak value box hota hain.or 2 button hote hain ok or cancel ka. in value ko hum store krva skte hain.yadi value enter karne ke bad ok click karne ke bajaye cancel pr click karte hain to value null hogi.

  • for example:
let answer = prompt("What is your name ?");
console.log(answer);

confirm box

confirm box me do button hote hain ok or cancel. ok button me click karne pr true answer ata hain or cancel pr false ata hain.

  • for example:
confirm("Are you sure?");