0% found this document useful (0 votes)
58 views1 page

Function Askconfirm (If (Confirm ("Are You Sure") ) Alert ("You Clicked Yes") Else (Alert ("You Clicked No") Return False ) )

This JavaScript function uses a confirm box to ask the user "are you sure" and checks their response. If the user clicks "Yes", an alert box will pop up saying "you clicked Yes". If the user clicks "No", an alert box will say "you clicked No" and the function will return false.

Uploaded by

Kalyan Maruti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views1 page

Function Askconfirm (If (Confirm ("Are You Sure") ) Alert ("You Clicked Yes") Else (Alert ("You Clicked No") Return False ) )

This JavaScript function uses a confirm box to ask the user "are you sure" and checks their response. If the user clicks "Yes", an alert box will pop up saying "you clicked Yes". If the user clicks "No", an alert box will say "you clicked No" and the function will return false.

Uploaded by

Kalyan Maruti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

function askConfirm()

{
if(confirm("are you sure"))
alert("you clicked Yes")
else
{
alert("you clicked No")
return false;
}
}

You might also like