Premium Essay

Sd1340

In: Computers and Technology

Submitted By renzomaguina
Words 637
Pages 3
Renzo Maguina SD1340 HTML5, CSS3 and JavaScript Lab 5-1
Questions:
Which <input> fields that you used were introduced in HTML5?
Following input types are introduced in HTML5:
1.Date
2.Tel
3.Email
4.Number
5.url
What is the difference between the two?
Internet 8 explorer opens the code with no errors and chrome comes up blank.
What change would you make to accept both positive and negative numbers as valid?
Add a loop to the characters to ensure that both positive and negative characters would be included in the function.
HTML CODE:
<!DOCTYPE HTML>
<html>
<head>
<title>Event Scheduler</title>
<script>
function ScheduledEvent(evtDate, evtTitle, maxattendees, coordinator, phonenum, email, infourl) { this.evtdate = evtDate; this.evttitle = evtTitle; this.maxattendees = maxattendees; this.coordinator = coordinator; this.phonenum = phonenum; this.email = email; this.infourl = infourl;

this.PrintEvent = PrintEvent;
}
function PrintEvent() { document.write("<p>You have scheduled an event named " + this.evttitle); document.write(" that will occur on " + this.evtdate); document.write(" and allow up to " + this.maxattendees + " attendees. "); document.write("The event is coordinated by " + this.coordinator); document.write(" who can be reached at " + this.phonenum); document.write(" or by email at " + this.email + ". "); document.write("More information about the event is available at <a href='" + this.infourl + "'> " + this.infourl + "</p>");
}
function IsNumeric(sNumber) { var numberChars = "0123456789."; var IsNumber = true; var currentChar; for (i = 0; i < sNumber.length && IsNumber == true; i++) { currentChar = sNumber.charAt(i); if (numberChars.indexOf(currentChar) == -1) { IsNumber = false; } } return IsNumber;
}…...

Similar Documents

Premium Essay

Week 5 Sd1340

...group write their code on the whiteboard. Built-In Objects EXPLORE ACTIVITY 4: BUILT-IN OBJECTS In-Class Activity Ungraded Course Support Tools/Resources required for this activity: Unit 5 PowerPoint Presentation (SD1340.U5.PP1) Unit5Sample2.html (SD1340.U5.AF2) Description: Use Slides 22 through 32 to discuss built-in objects. Students have already been introduced to the Array, String, and Math built-in objects. Use Slides 22 and 23 to show how a built-in object can be extended. Use Slides 24-26 to explore the Math object. Unit5Sample2.html (SD1340.U5.AF2) illustrates how random numbers are chosen, by generating a group of numbers and then calculating their average. An average of 0.5 indicates a random distribution. You can run the code more than once to show how the results differ. Slide 27 explains how you can use the “with” keyword to reduce the amount of typing. Use Slides 28-32 to discuss the Date object. Estimated Time: 20 minutes conditional statements EXPLORE ACTIVITY 5: CONDITIONAL STATEMENTS In-Class Activity Ungraded Course Support Tools/Resources required for this activity: Unit 5 PowerPoint Presentation (SD1340.U5.PP1) Unit5Sample3.html (SD1340.U5.AF3) timegreet.js (SD1340.U5.AF7) Description: Use Slides 33 through 40 to discuss conditional statements. Students are examining conditional statements and logical operators in PT1420, Introduction to Programming, during this unit. However, you......

Words: 1297 - Pages: 6