Using prompt dialog box
Complete the following codes- such that it will prompt for the name- place- time and what happen from you and construct a simple sentence. The simple sentence will be displayed using the document.write method.
<html>
<head>
<title>Simple JavaScript</title>
</head>
<body>
<!-- script tag-->
var name;
var place;
var time;
var verb;
document.write("Let s create our very own story.....<br/>");
name=prompt("The name of the main character is: ");
place=______________________________
time=_______________________________
verb=_______________________________
document.write(_______________________________);
</script>
<html>
<head>
<title>Simple JavaScript</title>
</head>
<body>
<!-- script tag-->
<script type="text/javascript">
var name;
var place;
var time;
var verb;
document.write("Let s create our very own story.....<br/>");
name=prompt("The name of the main character is: ");
place=prompt("Where is the place?: ");
time=prompt("What s the time?: ");
verb=prompt("What happen?: ");
document.write("The name is " + name " + place " + time " + verb);
</script>
But it doesn t work...the prompt box doesn t appear...all I can see is a blank page...please help...thanks
Using alert box
Complete the given codes such that when it is rendered by the browser- an alert box with the message I like IT1209 will appear:
<html>
<head>
<title> _________________________ </title>
</head>
<body>
<h3> Learn to use alert message box </h3>
<!-- script tag-->
________________________________
var message;
message= "I like IT1209!";
<!â"alert box to show I like IT1209 -->
________________________________
</script>
</body>
</html>
This is what I did:
<html>
<head>
<title>Alert Box</title>
</head>
<body>
<h3> Learn to use alert message box </h3>
<!-- script tag-->
<script type="text/javascript">
var message;
message= "I like IT1209!";
<!â"alert box to show I like IT1209 -->
function disp_alert()
{
alert("I like IT1209");
}
<!--
<input type="button" onclick="disp_alert()" value="Display alert box" />
-->
</script>
</body>
</html>
But it doesn t work...I m confused...Please help me..do explain too..thanks
no matter what i do- my stupid computer won t let me download the "New" adobe flash player. And i m going effing insane. My java script is on. I have tried to download everything physically possible. My computer actually started working correctly- then suddenly shut down and continues to give me this message. I DO NOT have a virus. I do not have spyware- and I don t know what the f*** is wrong with my effing computer. I need help before i go insane. SOMeone PLEASE give me some useful information. Every time i try to download adobe flash- Internet Explorer tells me the page is forbidden- and Firefox blocks it...
I have the latest version of flash player downloaded from adobe- and I was just watching youtube videos earlier today- now it says either your javascript is turned off and download the latest flash player. Well- I did download it- so that means the javascript is turned off- so please help me! Tell me how to turn it back on please!
Oh yeah- can you also tell me what I m suppose to do with these points? I just started yahoo answers- so I have no idea what their for.
On a Mac- and it keeps saying I don t have Javascript enabled- but I do. Any ideas?
No comments:
Post a Comment