Download presentation
Presentation is loading. Please wait.
1
Writing to a PAGE
2
Multi-page sites
3
Different styles Splash page – no content to start; never return
Hub and spokes – a base page that directs you to the others Sequential – to be read in order Peers – no order or dependencies Subpages – main page that leads you to others
4
Splash Page SPLASH
5
HUB AND SPOKES HUB
6
SEQUENTIAL
7
PEERS
8
SUBPAGES PAGE
9
More selectors
10
selective formatting Need to identify the elements that you want to format We have seen All elements Elements based on classes Elements based on context Pseudo-elements
11
Two new options Use an id Use any attribute Element#idname
Removes the need for class and id on the same element Use any attribute Element[attribute=“value”] Allows you to format only a single input field (name) or type (text)
12
Selecting based on attributes
tag[attribute=“value”] Formatting only applies to tags with that attribute value Tag.classname is same as Tag[class=“classname”] Other options (rarely used) w3schools
13
Chrome console
15
Writing to PAGE
16
Multiple options: just one today
INPUT type=TEXT or NUMBER User can set So can you! Need your next JavaScript statement!
17
Writing to the Page Can write to an input field as well as read it
<form name="typing"> <input type="text" name="input“> <input type="text" name="output" > </form> typing.output.value=typing.input.value;
18
Assignment Statement: “takes the value of”
The most fundamental statement in programming Destination = source; Destination takes the value of the source Evaluate the source Assign that value to destination Source can be literal, field or expression In this case, the destination is the text field called output
19
Now 2 options for onclick
Alert Assignment
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.