Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript confirm yes no

var proceed = confirm("Are you sure you want to proceed?");
if (proceed) {
  //proceed
} else {
  //don't proceed
}
Comment

js alert yes no

if (confirm('Are you sure you want to donate to Andrew Hyder?')) {
  // true (paypal.me/andrewdhyder)
} else {
  // false
}
Comment

javascript option yes/no popup

if (confirm('Are you sure you want to save this thing into the database?')) {
  // Save it!
  console.log('Thing was saved to the database.');
} else {
  // Do nothing!
  console.log('Thing was not saved to the database.');
}
Comment

javascript prompt yes/no

var answer = window.confirm("Save data?");
if (answer) {
    //some code
}
else {
    //some code
}
Comment

how to take yes or no in js

ans = confirm('continue ?');
//returns a boolean response
if (ans){
	//condition returns true...
}
else(){
	//condition returns false...
}
Comment

javascript confirm yes no

let proceed = confirm("Are you sure you want to proceed?");
if (proceed) {
  //proceed
} else {
  //don't proceed
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: split integer into digits javascript 
Javascript :: express js list all routes 
Javascript :: nextjs x tailwind 
Javascript :: mongoose virtual populate not working 
Javascript :: regex to check if string contains special characters javascript 
Javascript :: sleep javascript 
Javascript :: query injection nestjs 
Javascript :: js cant find element 
Javascript :: js last element of array 
Javascript :: how to download react router dom version 5 
Javascript :: if checkbox is checked 
Javascript :: isobject javascript 
Javascript :: uuid use in express 
Javascript :: turn number into array javascript 
Javascript :: console.log color 
Javascript :: react-native-checkbox in a loop 
Javascript :: refresh div jquery 
Javascript :: moment date difference in days 
Javascript :: javascript remove dom element 
Javascript :: javascript scroll down 
Javascript :: js check if string is base64 
Javascript :: cors header missing vue api gateway 
Javascript :: if odd js 
Javascript :: javascript toggle value 
Javascript :: expo ignore warnings 
Javascript :: change browser image react 
Javascript :: how to pass an object directly to formdata in javascript 
Javascript :: javascript get users location 
Javascript :: corresponding text to key code js 
Javascript :: how to get url query string value in javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =