Thank you. That was very helpful.
GeraldBlackmore
Posts
-
Help with class assignment -
Help with class assignmentThank you so much. a push the right way was exactly what I was asking for.
-
Help with class assignmentI have been trying to add the salutation string to p id="salutation" I can't figure it out. I have to use a html and a script separate this is what I have for the HTML.
<html>
<head>
<title>Invitation</title>
<meta charset="utf-8"></head>
<body>
<p id="salutation">
</p>
<p id="image"></p>
<p>You are invited to my house for a Cynco de Mayo party May 5, 2014.
</p>
<p>Sincerely,</p>
<p id="closingname"></p><script type="text/javascript" src="script\letter.js"></script>
</body>
</html>And this is what I have for the .js:
"use strict";
function greeting() {
var textOne = "Dear";
var name = "John";
var punc = ",";
document.write(textOne + name + punc);
}function complete() {
var yourName = "Gerald Blackmore";
var img = "<img src='image/partyimage.jpg'>";
greeting();
document.write(img);
document.write(yourName);}
complete();
These are the teachers instructions: Create the following web page and name it letter.html. <html> <head> <title>Invitation</title> <meta charset="utf-8"> </head> <body>
You are invited to my house for a Cinco de Mayo party May 5, 2014.
Sincerely,
</body> </html> Download an image that is appropriate for a Cinco de Mayo celebration and save it in an appropriate place on your web site. Create an external JavaScript file and name it letter.js. Add the appropriate <script> tag to letter.html to include this external JavaScript file. In the external JavaScript file you are to create two functions and invoke them. The first function should: Accept three arguments: a greeting, e.g. "Dear", "Hello", or "Greetings", first name, and any appropriate punctuation, such as "," or ":". The function should return a single string that is the full salutation in greeting, first name, punctuation order, e.g., "Dear Mark:". The second function should: Accept three arguments, the salutation returned by t
-
Help on class assignmentI have been trying to add the salutation string to p id="salutation" I can't figure it out. I have to use a html and a script separate this is what I have for the HTML Invitation
You are invited to my house for a Cynco de Mayo party May 5, 2014.
Sincerely,
And this is what I have in my .js script so far: "use strict"; function greeting() { var textOne = "Dear"; var name = "John"; var punc = ","; document.write(textOne + name + punc); } function complete() { var yourName = "Gerald Blackmore"; var img = "
"; greeting(); document.write(img); document.write(yourName); } complete();