jquery automatically click message alert 1

jquery automatically click message alert

var realConfirm=window.confirm;
  return true;

Here is what the above code is Doing:
1. It’s creating a new function called “realConfirm” that is a copy of the original “confirm” function.
2. It’s replacing the original “confirm” function with a new function that always returns “true”.
3. It’s calling the original “confirm” function and returning its result.

The result is that the original “confirm” function is called, but it’s been temporarily replaced with a function that always returns “true”.

The code above is a bit tricky, but it’s a common pattern in JavaScript.

The code below does the same thing, but it’s a bit easier to understand:

Similar Posts