answersLogoWhite

0


Best Answer

Here's the code:

<html>

<head>

<script type="text/javascript">

function callMe()

{

alert("Alert Box is called on body load");

}

</script>

</head>

<body onload="javascript:callMe()">

<h1 align="center">Content here</h1>

</body>

</html>

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which function can be used to create an Alert popup dialog box. Write an example to create an Alert popup box?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Name of dialog box?

The most common type of dialog box is the "alert".


What are some simple JavaScript programs a total newbie could create?

Personally, I recommend you begin with 'alert' boxes and 'prompt' boxes, then move your way up to variables, until eventually you understand functions, arrays, etc. Then you will be able to create JavaScript masterpieces. You may also want to learn php once you've mastered JavaScript. Simple alert example: Lesson 1: alert boxes alert("This is an alert dialog box."); Body text. Have fun!


What is function parameter or argument in JavaScript?

It is an input to the function. You can use them to apply the same operation to different inputs. You create a function with parameters by putting the parameters in a comma separated list in the parentheses after a function name. For example: function myFunctionWithParameters(parameter1,parameter2,parameter3) { //Code to execute } Within the code, you refer to them as if they were variables that were assigned to the parameter name. For example: function squareNumber(myNumber) { return myNumber*myNumber; } Parameter names follow the same rules as variable names: they cannot start with a number, they cannot have a dot in them, etc. To call a function with parameters, you simply put the values of the parameters within the parentheses. You can also use variable names to refer to the value to pass to the function. For example: var theNumber=10;alert(squareNumber(theNumber)); //Shows alert box displaying 100 Note that parameters can be passed in as any type. For example: function add(a,b) { return a+b; } alert(add(1,2)); //Shows alert box displaying 3 alert(add("foo","bar")); //Shows alert box displaying foobar


Javascript for opening a dialog box when a user clicks on a link?

What type of dialog box do you want? does it mean one which gets input or just displaying a message. &lt;html&gt; &lt;script&gt; function openDialogBox(){ alert("dialog box to display message") } function openCDialogBox(){ confirm("tel yes or no") } &lt;/script&gt; &lt;body&gt; &lt;a href="javascript:openDialogBox()"&gt;dialog box to display message&lt;/a&gt;&lt;br&gt; &lt;a href="javascript:openCDialogBox()"&gt;dialog box to get value from user(either true or false)&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; Hope it answers your question.


How is Alert used a sentence as noun and verb?

The noun 'alert' can function as the subject of a sentence or a clause, and as the object of a verb or a preposition. Example sentences:An alert will be given when the limo arrives. (subject of the sentence)We heard the alert that the limo had arrived. (direct object of the verb 'heard')The verb 'alert' can function as a main verb or an auxiliary verb. Example sentences:Please alert the chef that we have an extra guest. (main verb)The chef will alert us when to seat the guests. (auxiliary verb)


Example of predefined function?

function callMe (fx_params) { alert(fx_params); } callMe('Alert Loaded from a JavaScript function'); This would be in a javascript page, or in a JS Script tag.. - Caleb Convina Web Design and Hosting


What are different dialog boxes in JavaScript?

There are three Types of Dialog Boxes in JavaScript1. alert() : The simplest to direct output to a dialog box is to use the alert() method. The alert dialog box is used to display an alert message to the user.2. prompt() : The prompt() method dialog box allows the user the opportunity to enter information. It takes two parameters; a message and a default string for the text entry field.3. confirm() : The confirm dialog box returns a Boolean value based on the user's selection.


Create an HTML page which pops up an alert message?

&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function show_alert() { alert("I am an alert box!"); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="button" onclick="show_alert()" value="Show alert box" /&gt; &lt;/body&gt; &lt;/html&gt;


What is a method in JavaScript?

Hi there, a method is a "function" in a object. Example: function answers(){ this.world = function(){alert("hello world")}; } var hello = new answers(); hello.world(); &lt;--- world is a method of the object hello.


What is an Alert in JavaScript?

A JavaScript Alert, called by using the alert(msg); function, creates a dialog window in front of the browser that displays some sort of message (msg) and an OK button. The user much click the OK button in order to do anything else on that page.Additional:alert("Hello World!"); //simply an alert msg with ok buttonconfirm("Are you sure you want to quit?"); // it is a confirmation box with ok and cancel buttonprompt("Enter Your name."); //this one will let you enter something in a box.


Which javascript function is most useful for finding erro?

Alert


What is function in javascript?

A Function in JavaScript is a note to the program to group all of the actions performed in the Function clause to be referenced as the functions name, so that one does not need to copy out the function every time they want to run the group of actions.