12.07.2015 Views

Problem 1 <html> <head> <script language="JavaScript ... - Krypton

Problem 1 <html> <head> <script language="JavaScript ... - Krypton

Problem 1 <html> <head> <script language="JavaScript ... - Krypton

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>JavaScript</strong> ObjectsDateMathnavigatorwindowframeframe[ ]documentX: Gets or sets the date or time. Top level object.: Performs math with numbers. Top level object.: Information about the browser - its name and version. Top level object.: A browser window. Top level object.: window is divided into many frames. Each frame can contain a different document. Framesbelong to a “parent” window.: An array of frames in a”parent” window.: Belong to window object in a browser or a frame object when a window is separated intoframes.Hierarchy of windows and famesY-1Y-2Frame X Frame Y• Frames are subordinate windows to a parent, or framesetObjects belonging to a document:linkanchoranchors[]locationhistoryStringformforms[]ParentFrameset“Frame Y”“Frame X”: A hypertext link. links[] : An array of links in a page.: A target (i.e destination) for a hypertext link.: An array of anchors in a document.: The URL of current document.: A list of history the browser has visited.: A series of string in a document that created them.: A form in a document.: An array of forms in a document.“Frame Y-1”Nested Frames“Frame Y-2”Form Objects (Array)Example:o Any forms defined in HTML document are placed into an array that’s a property(part) of thedocument. To access the forms we have a<strong>lt</strong>ernate approaches.Access by forms[ ] array:document.forms[0] //the firstFormdocument.forms[1] //the secondFormdocument.forms[index].property|methodAccess by names:document.firstFormdocument.secondFormdocument.formName.property|method8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!