FormsIII - content should be available without JavaScript...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
ANNOUNCEMENTS No posting of code in the forum Check class announcements daily Quiz Today 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 SEPARATING CONTENT FROM BEHAVIOR Keep each of the following separate Content (HTML) Presentation (CSS) Behavior (JavaScript) Separating HTML and JavaScript Use src attribute of <script> Place the <script></script> in <head> Example: folder named Separation
Background image of page 2
3 ADVANTAGES OF SEPARATION Simplifies HTML files (removes large segments of JavaScript code) Functions can be cached by the browser for efficiency Code sharing/reuse Function used by several pages can be kept in a single file
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 USE OF JAVASCRIPT IN WEB PAGES Unobtrusive JavaScript programming paradigm specifying that JavaScript should not intrude on users accessing a web page, on HTML content, or CSS Stylesheets Goals Keep JavaScript code separate from HTML Scripts are enhancements to HTML content, but the
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: content should be available without JavaScript You should design web pages so they operate even if JavaScript is disabled CHECKBOXES Allow us to make a selection Defined by using type=checkbox We can tell whether an entry is selected by using the checked property true entry has been selected Default selection by using checked=checked Example: Checkboxes.html It is used when submitting data to a server 5 RADIO BUTTONS Exist in groups and only one can be checked in a group Defined by using type=radio We defined the radio buttons to be in the same group by using the same name for all of them Note: Do not use the same value for name and id Default selection by using checked=checked We access the elements using arrays document.getElementsByName returns array Example: RadioButtons.html 6...
View Full Document

Page1 / 6

FormsIII - content should be available without JavaScript...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online