Code for Adding Message and Confirmation Boxes Using
JavaScript?



Code for Adding Message and Confirmation Boxes Using JavaScript?..

Answer / sivasubramanian.k

<html>
<head>
<script>
function message()
{
var str;
str="Click Ok to continue!!!";
alert(str);
}
function confirmation()
{
var str;
str="Are you sure to delete?Then click Ok or Cancel!!!";
confirm(str);

}
</script>
</head>
<body>
<form>
<h3>Click the button below which shows message box</h3>
<input type="submit" value="Click Me" name="submit"
onClick="return message()">
<h3>Click the button below which shows confirmation box</h3>
<input type="submit" value="Delete" name="delete"
onClick="return confirmation()">

</form>
</body>
</html>

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More JavaScript Code Interview Questions

how to pass data between pages using Frames

0 Answers  


how to create Expandable and Collapsible Menus

0 Answers  


how to pass data between pages using Cookies

0 Answers  


program to show a progress bar

0 Answers   Infosys,


how to pass data between pages using URLs

1 Answers   Symantec,






how to transform XML Data into HTML

0 Answers  


How to Add Message and Confirmation Boxes Using JavaScript?

1 Answers  


how to Auto Scroll the page

0 Answers   Ninestars,


Reading which Character Key was pressed

1 Answers  


Reading which Non-Character Key was pressed

0 Answers  


how to determine which Mouse Button was pressed

1 Answers  


how to create an anonymous function

0 Answers  


Categories
  • PHP Code Interview Questions PHP Code (33)
  • JSP Code Interview Questions JSP Code (6)
  • ASP Code Interview Questions ASP Code (5)
  • CGI Perl Code Interview Questions CGI Perl Code (3)
  • JavaScript Code Interview Questions JavaScript Code (63)
  • VB Script Code Interview Questions VB Script Code (20)
  • Shell Script Code Interview Questions Shell Script Code (31)
  • Python Code Interview Questions Python Code (34)
  • WinRunner Code Interview Questions WinRunner Code (1)
  • HTML DHTML XHTML Code Interview Questions HTML DHTML XHTML Code (13)
  • XML Interview Questions XML (43)
  • Scripts_Markup Code AllOther Interview Questions Scripts_Markup Code AllOther (5)