



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




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 content should be available without JavaScript
You should design web pages so they operate even if JavaScript is disabled.
The tag can be used to define content where scripting cannot be used (e.g., disabled by user)
Example: Separate folder
Run example with JavaScript Disabled ToolsOptionsContent (in Firefox)
Number - Returns NaN is the argument does not represent a well-
formed numeric literal; otherwise a number.
parseFloat – Takes a string as an argument and converts the
string to a floating point number. It stops parsing the string once it founds a character that cannot be part of a floating point number. Returns NaN if a number cannot be generated. Leading and trailing spaces are allowed.
parseInt – Takes two parameters: a string and a radix (defaults to
10). With a string parameter behaves basically like parseFloat but returning an integer.
Example: ParsingStrNum.html