![]() |
Dynamically Changing Text content![]() ![]() ![]() ![]() ![]()
Putting the Script on a Web PageIn theory, scripts do not belong within the <BODY></BODY>tag pair, but instead belong within the <HEAD></HEAD> tag pair. In practice, Web authors put<SCRIPT></SCRIPT> tag pairs anywhere between the <HTML></HTML> tags. Web browser parsers can handle scripts anywhere within the HTML file. Changing Text Attributes You change text attributes to emphasize text. Sometimes, a certain emphasis represents specific information. For example, in a list of current stock quotes, red stock values can indicate stocks that have lost value recently, and green stock values can indicate stocks that have gained value. Black quote might not have changed in a certain time period. Changing Text Size For a phone listing, dynamically changing text is very helpful for a reader. As he / she dials the phone number, he / she can focus on the one item in the list that looks different from all the others. Let us take an example where the ondblclick event is implemented. When a reader double clicks on a name, the selected list item's font size changes to 32 points. To create dynamically changing text you first create paragraph tags around each item you want to change independently, and add an ID attribute and event attribute to each paragraph. Finally, create a script function that matches the same name as the paragraph event attribute value. The script function contains a single line that assigns a new value to the appropriate style property. the user's browser to display, they cannot control which fonts are installed on the user's system.
|
|
Domain NamesDHTML Document Object Model Features of Dynamic HTML HTML Versus DHTML Netscape's Vision of DHTML Microsoft Vision of DHTML Cascading Style Sheets(CSS) Inline Style Sheets Embedded Style for a Page Linked Cascading Style Sheet Text Specific Style AttributesCSS Attributes Assigning Classes Java Script Style Sheets(JSSS) Object Property Functions Methods
Creating Style Sheets with JSSS New JSSS Methods Working Layers Positioning the Layer Using More than One Layer Moving a Layer Around on the Page Events
The mouseOver and mouseOut Events The mouseMove Event The Keyboard Events The mouseDown and mouseUp Events The dragDrop Event Error Event Form Event The Script Tag Changing Text Color Inline Text Attribute Changes Text Dynamically Changing StylesExample of Dynamically Changing Style Dynamically Changing Content HTML Replacement Changing Text Content An Example of HTML Graphics ReplacementWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |