Presentation is loading. Please wait.

Presentation is loading. Please wait.

Writing to a PAGE.

Similar presentations


Presentation on theme: "Writing to a PAGE."— Presentation transcript:

1 Writing to a PAGE

2 Multiple options: just one today
INPUT type=TEXT or NUMBER User can set So can you! Assignment statement: output-cubby “takes the value of” input-cubby

3 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;

4 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

5 Now 2 options for onclick
Alert Assignment

6 More selectors

7 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

8 new option Use any attribute Allows you to format only a single
element[attribute=“value”] Allows you to format only a single input field (name) or type (text)

9 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


Download ppt "Writing to a PAGE."

Similar presentations


Ads by Google