answersLogoWhite

0

Use the confirm dialog box. Below is the code

<html>

<body>

<button onclick="showConfirm()">Save</button>

<script>

function showConfirm()

{

var x;

var r=confirm("Are you sure you want to save the data?");

if (r==true)

{

x="You pressed OK!"; // In place of x write code to be executed

}

else

{

x="You pressed Cancel!"; // Leave else statement unless necessary

}

document.getElementById("demo").innerHTML=x;

}

</script>

</body>

</html>

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Can you save Java Script on Roblox?

While your playing a game you can't.


How do you open java script?

You need to have some program that can open/run them on your computer. To save them, then run them, save them as a .Js files.


What is the use of 'Dialog' class in java?

From the Java API: "A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user." Dialogs are useful specifically to take input because they can be made to block input to other Window objects until the user finishes with the Dialog (think: Save File dialog box).


How do you save image in sql using Java?

You can convert the image into a byte stream and save it in the database as a BLOB


Which dialog box is used to change the save location of a library?

Library Locations


The save as dialog box appears every time you save a file?

The very first time you save, you will get the Save As dialog box. After that, as long as you use the Save option from the File menu, as opposed to the Save As option, you will not see the Save As dialog box again. You can also do it by pressing and holding the Ctrl key and pressing S, or by clicking on the icon on the toolbar. Only if you want to change the way you are saving it, like using a different name or a different location, do you need to use Save As again.


What is the differednce between save and save as?

When you work with open document which already have been saved, you can press Save and this will save changes without Save As dialog in Explorer, any time you press Save As will open Save As dialog in Explorer.


How do you install RSbot scripts?

In order to install RSBot scripts you need to go into your documents where their should be an RSBot folder. Open that and you will find a scripts folder. In there a Source folder which is where you save your script. Make sure you save the source as a .java or if it is a .class (already compiled Java code) put it into the pre-compiled folder. Once you have your .java source in the the folder back track and you should see a Compile Scripts CMD. Make sure you have java JDK (google it and download) then run the .bat. The script will compile and your good. Amplex~ RSBot Developer


How can you save a shared report to your computer on the usbankcom website?

Select the Save button on the file download dialog box


A sentence with the word dialog?

The actors did their best but the dialog was so dull that they couldn't save the play.


What is dialog box?

dialog boxdialog bo the bo that appears on the sreen for eg:- when u select 'save as' a box appears .this is known as the dialog box.


Can you create a folder in a save dialog box?

Yes