2

Week12 11/28 JavaScript

Readings:

W3Schools Online Web Tutorials

______________________________________________________

Section 1. Introduction

[kml_flashembed movie=” http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=week12javascript-110503224255-phpapp01&stripped_title=week12-javascript-7826642″ width=”525″ height=”405″ allowfullscreen=”true” /]

______________________________________________________

Section 2. Where to write Javascript?

Creating A Simple Internal JavaScript In Your Webpage

[youtube]http://www.youtube.com/watch?v=wUzwLK3s3EU[/youtube]

Creating External JavaScripts and Linking them to your HTML document

[youtube]http://www.youtube.com/watch?v=aPuWMrmE3FM&feature=related[/youtube]

______________________________________________________

Section 3. JavaScript Variables and Operators

[youtube]http://www.youtube.com/watch?v=J_Lm3zi7wnU&feature=related[/youtube]

[youtube]http://www.youtube.com/watch?v=00LZnu_lYe8&feature=related[/youtube]

______________________________________________________

Section 4. Global and Local Variables
[youtube]http://www.youtube.com/watch?v=waF2Isf-phQ[/youtube]

______________________________________________________

Section 5. Understanding the Order of Operations

[youtube]http://www.youtube.com/watch?v=ZlOXWZ9vgRo&feature=related[/youtube]

______________________________________________________

Section 6. Functions in Javascript

[youtube]http://www.youtube.com/watch?v=WPopG1L01ck[/youtube]

______________________________________________________

Section 7. If Statement

[youtube]http://www.youtube.com/watch?v=5gjr15aWp24[/youtube]

If else Statment
[youtube]http://www.youtube.com/watch?v=FKyrQYkihGw[/youtube]

______________________________________________________

Section 8. For Loop

[youtube]http://www.youtube.com/watch?v=Coxgr66EwRk[/youtube]

______________________________________________________

Section 9. While Loop

[youtube]http://www.youtube.com/watch?v=QPFW_0blw9w[/youtube]

______________________________________________________

Assignment (5 points):

Use a loop or a function to create a program that displays the following:

This is created with JavaScript:

This is my lucky number 20.
This is my lucky number 18.
This is my lucky number 16.
This is my lucky number 14.
This is my lucky number 12.
This is my lucky number 10.
This is my lucky number 8.
This is my lucky number 6.
This is my lucky number 4.
This is my lucky number 2.
This is my lucky number 0.

After it is done, please submit your .html file to the Blackboard under Assignments > Week12.

Thanks.

2 comments to Week12 JavaScript

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

STAY IN TOUCH

Simple Calendar

April 2025

Sun Mon Tue Wed Thu Fri Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

LEAVE A MESSAGE

<div class="wpcf7 no-js" id="wpcf7-f33-o1" lang="" dir="ltr" data-wpcf7-id="33"> <div class="screen-reader-response"><p role="status" aria-live="polite" aria-atomic="true"></p> <ul></ul></div> <form action="/?page_id=188#wpcf7-f33-o1" method="post" class="wpcf7-form init" aria-label="Contact form" novalidate="novalidate" data-status="init"> <div style="display: none;"> <input type="hidden" name="_wpcf7" value="33" /> <input type="hidden" name="_wpcf7_version" value="6.0.5" /> <input type="hidden" name="_wpcf7_locale" value="" /> <input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f33-o1" /> <input type="hidden" name="_wpcf7_container_post" value="0" /> <input type="hidden" name="_wpcf7_posted_data_hash" value="" /> </div> <p > <font size="1" face="georgia" color= #888888 >Your name: (required) <span class="wpcf7-form-control-wrap" data-name="your-name"><input size="28" maxlength="30" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="your-name" /></span> </font> </p> <p> <font size="1" face="georgia" color= #888888>Your email: (required) <span class="wpcf7-form-control-wrap" data-name="your-email"><input size="28" maxlength="30" class="wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email" aria-required="true" aria-invalid="false" value="" type="email" name="your-email" /></span> </font> </p> <p> <font size="1" face="georgia" color= #888888 >Subject: <span class="wpcf7-form-control-wrap" data-name="your-subject"><input size="28" maxlength="30" class="wpcf7-form-control wpcf7-text" aria-invalid="false" value="" type="text" name="your-subject" /></span> </font> </p> <p> <font size="1" face="georgia" color= #888888>Your message: <span class="wpcf7-form-control-wrap" data-name="your-message"><textarea cols="40" rows="3" maxlength="2000" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false" name="your-message"></textarea></span> </font> </p> <p> <font size="1" face="georgia" color= #888888>Input this verification code: </font> </p> <p><input type="hidden" name="_wpcf7_captcha_challenge_captcha-382" value="2999817243" /><img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-captcha-382" width="72" height="24" alt="captcha" src="https://files.cunyac.reclaimhosting.dev.s3.amazonaws.com/wp-content/blogs.dir/854/files/wpcf7_captcha/2999817243.png" /><span class="wpcf7-form-control-wrap" data-name="captcha-382"><input size="15" maxlength="15" class="wpcf7-form-control wpcf7-captchar" autocomplete="off" aria-invalid="false" value="" type="text" name="captcha-382" /></span> </p> <p><input class="wpcf7-form-control wpcf7-submit has-spinner" type="submit" value="Send" /> </p><p style="display: none !important;" class="akismet-fields-container" data-prefix="_wpcf7_ak_"><label>Δ<textarea name="_wpcf7_ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_2" name="_wpcf7_ak_js" value="233"/><script>document.getElementById( "ak_js_2" ).setAttribute( "value", ( new Date() ).getTime() );</script></p><div class="wpcf7-response-output" aria-hidden="true"></div> </form> </div>