JavaScript object instance and javascript instance
Document Object (1)
- Output text using document. write ()
- Use document. write () to output HTML
- Returns the number of anchors in the document.
- Returns the innerHTML of the first anchor in the document.
- Returns the number of forms in the document.
Document Object (2)
- Returns the name of the first form in the document.
- Number of images in the returned document
- Returns the ID of the first image in the document.
- Number of links in the returned document
- Returns the ID of the first link in the document.
Document Object (3)
- Returns the name/value pair of all cookies in the document.
- Returns the server Domain Name of the loaded document.
- Returns the last modification time of the document.
- Returns the URL of the loaded current document.
- Return document title
Document Object (4)
- Returns the complete URL of the document.
- Open the output stream and input text to the stream
- The difference between write () and writeln ()
- Use the specified ID to pop up the innerHTML of an element.
- Number of elements popped up with the specified Name
- Number of elements popped up with the specified tagname
Anchor object
- Returns and sets the charset attribute of the link.
- Returns and sets the href attribute of the link.
- Returns and sets the hreflang attribute of the link.
- Returns the name of an anchor.
- Returns the relationship between the current file and the linked document.
- Change the target attribute of a link
- Returns the value of the type attribute of a link.
Area object (1)
- Returns the alternative text mapped to an area of the image.
- Returns the coordinates of a region mapped to the image.
- Returns the anchor part of the href attribute of a region.
- Returned Host Name: port of a region mapped to the image
- Returns the hostname of a region mapped to the image.
- Returns the port of a region mapped to the image.
Area object (2)
- Returns the href of a region mapped to the image.
- Returns the pathname of a region mapped to the image.
- Returns the protocol of a region mapped to the image.
- Returns the querystring part of the href attribute of a region.
- Returns the shape of a region mapped to the image.
- Returns the target value of a region mapped to the image.
Base Object
- Returns the base URL of all relative URLs on the page.
- Returns the base link of all relative links on the page.
Button Object
- When the button is clicked, It is unavailable.
- Returns the name of a button.
- Returns the type of a button.
- Returns the value of a button.
- Returns the ID of the table to which a button belongs.
Form object
- Returns the value of all elements in a form.
- Returns the value of the acceptCharset attribute of a form.
- Returns the value of a form action attribute.
- Returns the value of the enctype attribute in the form.
- Returns the number of elements in a form.
- Return the method for sending form data
- Returns the name of a form.
- Returns the value of the target attribute of a form.
- Reset form
- Submit Form
Frame/IFrame object
- Iframe formatting
- Change the background color of a document contained in iframe
- Returns the value of the frameborder attribute in an iframe.
- Delete the frameborder of iframe
- Change the iframe height and width
- Returns the value of the longdesc attribute in an iframe.
- Returns the value of the marginheight attribute in an iframe.
- Returns the value of the marginwidth attribute in an iframe.
- Returns the value of the name attribute in an iframe.
- Returns and sets the value of the scrolling attribute in an iframe.
- Change the src of an iframe
Image Object
- Image formatting
- Returns the replacement text of the image.
- Add border to the image
- Change the image height and width
- Set the image's hspace and vspace attributes
- Returns the value of the longdesc attribute of the image.
- Create a link pointing to a low-resolution image
- Returns the image name.
- Change the src of the image
- Returns the value of usemap mapped to a client image.
Event object
- Keycode of the pressed keyboard key?
- What are the coordinates of the mouse?
- What are the coordinates of the mouse over the screen?
- Is the shift key pressed?
- Which event happened?
Option and Select object
- Drop-down list for disabling and enabling
- Obtain the ID of the form with a drop-down list
- Number of options in the drop-down list
- Change the drop-down list to multi-row list
- Select multiple options from the drop-down list
- The selected option is displayed in the drop-down list.
- The index of the selected option is displayed in the drop-down list.
- Change the text of the selected option in the drop-down list
- Delete options from the drop-down list
Table, TableHeader, TableRow, TableData object
- Change the Border width of a table
- Change the cellpadding and cellspacing of a table.
- Frame of the specified table
- Specify rules for a table
- InnerHTML of a row
- InnerHTML of a cell
- Create a title for the table
- Delete rows in a table
- Add rows in the table
- Add cells in a table row
- Cell content Horizontal Alignment
- Cell content Vertical Alignment
- Horizontal alignment of the content of a single cell
- Vertical Alignment of the content of a single cell
- Change the cell content
- Change row content