79 views8 pages
10 Nov 2015
School
Course
Professor

Document Summary

Javascript: javascript purpose: client- side scripting, make websites interactive. Insert dynamic text into htmnl (ex. user name) React to events (ex. page load, user click, keyboard events) Get information about a user"s computer (ex. browser type) Perform caculations on user"s computer (ex. for validation: not related to java in syntax. Type ! find type of an object with typeof(object) Returns the name of the object"s type ! object, boolean, number, string, function typeof [1, 2, 4] === "object"; // Array is an object: control and looping. Javascript = interpreted, not compiled. Variables don"t need to be declared. Key contruct = functions, not classes: limitations: No file/directory access defined in the language. No raw network access, limited to. Send html form data to ! web servers, cgi scripts, emails same- as- origin policy. Can only read props of documents and windows from the same place: host, port, portocol. Explicit declaration: var i = 12;