Home  >  Article  >  Web Front-end  >  Complete collection of css attribute styles, events, collections, filters, methods, objects, and styles

Complete collection of css attribute styles, events, collections, filters, methods, objects, and styles

高洛峰
高洛峰Original
2016-11-24 10:39:001459browse

Tag properties/attributes
Behavior
Collection
Events
Filters
Methods
Objects
Styles
Tag properties Property description
ALIGN align Set or get table alignment.
ALLOWTRANSPARENCY allowTransparency sets or gets whether the object can be transparent.
APPLICATION APPLICATION Indicates whether the object's content is an HTML application (HTA), in order to exempt the browser safe mode.
ATOMICSELECTION specifies whether the element and its content can be selected uniformly in an invisible unit.
BEGIN begin Sets or gets the delay time before the timeline plays on this element.
BORDER border sets or gets the space between frames, including 3D borders.
canHaveChildren Gets a value indicating whether the object can contain children.
canHaveHTML Gets a value indicating whether the object can contain rich HTML tags.
CLASS className sets or gets the class of the object.
contentWindow gets the window object of the specified frame or iframe.
DATAFLD dataFld Sets or gets the field specified by the dataSrc attribute that is bound to the given data source of the specified object.
DATASRC dataSrc sets or gets the data source used for data binding.
disabled Gets a value indicating whether the user can interact with this object.
END end Sets or gets a value indicating the end time of the element, or a simple duration end time when the element is set to repeat.
firstChild Gets a reference to the first child object of the object's childNodes collection.
FRAMEBORDER frameBorder sets or gets whether to display the border of the frame.
hasMedia Gets a Boolean value indicating whether the element is an HTML+TIME media element.
HEIGHT height sets or gets the height of the object.
HIDEFOCUS hideFocus Sets or gets a value indicating whether the object is explicitly focused.
HSPACE hspace sets or gets the horizontal margin of the object.
ID id gets the string that identifies the object.
innerText Sets or gets the text located within the start and end tags of the object.
isContentEditable Gets a value indicating whether the user can edit the object's content.
isDisabled Gets a value indicating whether the user can interact with this object.
isMultiLine Gets a value indicating whether the object's contents contain one line or multiple lines.
isTextEdit Gets whether a TextRange object can be created using this object.
LANG lang Set or get the language to use.
LANGUAGE language sets or gets the language used for current script writing.
lastChild gets the reference of the last child object in the childNodes collection of this object.
longDesc Sets or gets the Uniform Resource Identifier (URI) of the object's long description.
MARGINHEIGHT marginHeight sets or gets the height of the top and bottom margins before displaying text in the frame.
MARGINWIDTH marginWidth sets or gets the left and right margin width before displaying text in the frame.
NAME name sets or gets the name of the frame.
nextSibling Gets a reference to the next sibling object of this object.
nodeName Gets the name of a specific node type.
nodeType Gets the type of the required node.
nodue sets or gets the value of the node.
offsetHeight Gets the height of the object relative to the layout or the parent coordinate specified by the parent coordinate offsetParent property.
offsetLeft Gets the calculated left position of the object relative to the layout or parent coordinates specified by the offsetParent property.
offsetParent Gets a reference to the container object that defines the offsetTop and offsetLeft properties of the object.
offsetTop Gets the calculated top position of the object relative to the layout or parent coordinates specified by the offsetTop property.
offsetWidth Gets the width of the object relative to the layout or the parent coordinate specified by the parent coordinate offsetParent property.
onOffBehavior Gets an object that indicates whether the specified Microsoft®DirectAnimation® behavior is running.
outerHTML sets or gets the HTML form of the object and its content.
outerText sets or gets the text of the object.
ownerDocument sets or gets the document object associated with the node.
parentElement Gets the parent object in the object hierarchy.
parentNode gets the parent object in the document hierarchy.
parentTextEdit Gets the container object in the document hierarchy that can be used to create a TextRange containing the original object.
previousSibling Gets a reference to the previous sibling object of this object.
readyState Gets the current state of the object.
readyState Gets a value indicating the current state of the object.
recordNumber Gets the original record of the generated object in the dataset.
scopeName gets the namespace defined for this element.
SCROLLING scrolling sets or gets whether the frame can be scrolled.
SECURITY SECURITY Gets a value indicating whether the source file of the frame or iframe has specific security restrictions applied.
sourceIndex gets the sequential position of the object in the source order, that is, the order in which the object appears in the all collection of document.
SRC src Sets or gets the URL to be loaded by the object.
STYLE sets the inline style for this setting element.
SYNCMASTER syncMaster Sets or gets whether the time container must synchronize playback on this element.
SYSTEMBITRATE Gets the approximate bps of available bandwidth in the system.
SYSTEMCAPTION Indicates whether text should be displayed instead of the audio portion of the presentation.
SYSTEMLANGUAGE Indicates whether the given language is selected in the options settings on the user's computer.
SYSTEMOVERDUBORSUBTITLE Specifies whether dubbing or subtitles are to be rendered for users who are watching the presentation but are not familiar with the language of the audio being played.
TABINDEX tabIndex sets or gets the index that defines the tab order of the object.
tagName Gets the tag name of the object.
tagUrn sets or gets the Uniform Resource Name (URN) specified in the namespace declaration.
TIMECONTAINER timeContainer sets or gets the timeline type associated with the element.
TITLE title Set or get the object's consultation information (tooltip).
uniqueID Gets the automatically generated unique identifier for the object.
UNSELECTABLE specifies that the element cannot be selected.
VSPACE vspace sets or gets the vertical margin of the object.
WIDTH width sets or gets the width of the object.


Tag Attributes/Properties

Behavior

Behavior Description
clientCaps Provides information about features supported by Internet Explorer and provides a way to install them out of the box.
download downloads the file and notifies a specified callback function after the download is completed.
homePage contains information about the user's homepage.
time provides an active timeline for HTML elements.
time2 provides an active timeline for an HTML element or group of elements.

Collection

Collection Description
all Returns a reference to the collection of elements contained by the object.
attributes Gets the collection of object tag attributes.
behaviorUrns Returns a collection of Uniform Resource Name (URN) strings that identify the behaviors attached to this element.
childNodes Gets a collection of HTML elements and TextNode objects that are direct descendants of the specified object.
children Gets a collection of DHTML objects that are direct descendants of the object.

Event

Event Description
onactivate Fires when an object is set as an active element.
onafterupdate is triggered on the data binding object after the associated object in the data source object is successfully updated.
onbeforedeactivate is triggered immediately before activeElement changes from the current object to another object in the parent document.
onbeforeupdate is triggered on the data binding object before the associated object in the data source object is successfully updated.
onblur is triggered when the object loses input focus.
oncontrolselect is triggered when the user is about to create a control selection area for the object.
ondeactivate is triggered when activeElement changes from the current object to another object in the parent document.
onerrorupdate is triggered on the data binding object when an error occurs when updating the associated data in the data source object.
onfocus Fires when an object gains focus.
onload is triggered immediately after the browser completes loading the object.
onmove is triggered when the object moves.
onmoveend is triggered when the object stops moving.
onmovestart Fires when the object starts moving.
onreadystatechange is triggered when the object state changes.
onresizeend is triggered when the user has finished changing the size of the object in the selection area of ​​the control.
onresizestart is triggered when the user starts to change the size of the object in the selection area of ​​the control.
ontimeerror Fires unconditionally when a specific time error occurs, usually caused by setting a property to an invalid value.

Filters

Filter attribute description
Alpha adjusts the opacity of the object content.
AlphaImageLoader displays the image between the object's bounds and the object's background to the content, optionally cropping or scaling the image size. When loading Portable Web Graphics (PNG), transparency from 0 to 100% is supported.
Barn displays the new content of the object by opening or closing the door.
BasicImage Adjust color processing, image rotation, or opacity of object content.
BlendTrans displays the new content of an object by fading out the original content.
Blinds Reveal new content of objects with motion that opens or closes blind spots.
Blur Blur the contents of an object so that it appears out of focus.
CheckerBoard displays the object's new content in the form of a checkerboard uncovered over the original content.
Chroma Displays the specified color of the object content as transparent.
Compositor displays the new content of an object as a logical color combination of the old and new content. Color and alpha values ​​for each version are calculated to determine the final color of the output image.
DropShadow creates a solid shadow of the object's content, offset in the specified direction. This will make the content appear to be floating and therefore create a shadow.
Emboss displays objects in an embossed texture using grayscale values.
Engrave displays objects with an engraved texture using grayscale values.
Fade Displays the new content of an object by fading out the original content.
FlipH displays the object content in a horizontally flipped form.
FlipV displays the object content in a vertically flipped form.
Glow Adds a glow to the outside of the object's edges to make it look like it's glowing.
Gradient displays a gradient color surface between the object's background and content.
GradientWipe displays the new content of an object in the form of a gradient band covering the original content.
Gray displays object content in grayscale.
ICMFilter Converts the color content of an object based on an Image Color Management (ICM) profile. This will allow the display of specified content to be improved, or to emulate the display on a hardware device such as a printer or monitor.
Inset displays the new content of the object diagonally.
Invert Inverts the hue, saturation and brightness of the object's content.
Iris displays the object's new content with a rainbow effect, similar to a camera aperture opening.
Light Creates a light effect on the object's content.
MaskFilter displays transparent pixels of the object content as a color mask and non-transparent pixels as transparent.
Matrix Use matrix transformations to scale, rotate, or reveal the contents of an object.
MotionBlur displays object content with a motion blur effect.
Pixelate displays the contents of an object as a colored square, the color of which depends on the average color value of the area that the square replaces. This filter display can be toggled.
RadialWipe reveals the new content of the object in the form of radial erasure.
RandomBars reveal the new content of an object in the form of an explosion of random pixel lines.
RandomDissolve reveals the new content of an object in the form of a random pixel explosion.
Redirect is not supported yet.
RevealTrans reveals the new content of an object using 24 predefined transition effects.
Shadow creates a solid shadow of the object's content, offset in the specified direction. This will create a shadow effect.
Slide displays the new content of the object in the form of an image slide.
Spiral reveals the new content of the object in the form of spiral motion.
Stretch reveals the new content of the object in the form of stretching over the original content. There is an option like moving a cube from one surface to another.
Strips displays the original content of the object in the form of a strip overlay, as if a saw was sawing the original content.
Wave performs a vertical sine wave distortion on the object's content.
Wheel Reveals the object's new content in the form of a rotational motion, as if a wheel rolled over the original content.
Xray changes the color depth of object contents to display them in black and white.
Zigzag moves the object's new content back and forth on the object so that it overwrites the original content.

Method

Method description
addBehavior Attach a behavior to the element.
appendChild Appends a child element to the object.
applyElement makes an element a child or parent of other elements.
attachEvent Binds the specified function to an event so that it is called whenever the event fires on the object.
blur causes the element to lose focus and triggers the onblur event.
clearAttributes removes all tag attributes and values ​​from the object.
cloneNode copies a reference to an object from the document hierarchy.
componentFromPoint returns the position of the object at the specified coordinates through a specific event.
contains checks whether the given element is contained in the object.
detachEvent Unbinds the specified function from the event so that the function will not receive notification when the event is triggered.
dragDrop initializes the drag event.
fireEvent triggers the specified event of the object.
focus causes the element to get focus and execute the code specified by the onfocus event.
getAdjacentText returns the adjacent text string.
getAttribute Gets the value of the specified label attribute.
getAttributeNode gets the attribute object referenced by the attribute.name attribute.
getElementsByTagName Gets a collection of objects based on the specified element name.
getexpression_r Gets the expression for a given attribute.
hasChildNodes Returns a value indicating whether the object has children.
insertAdjacentElement inserts an element at the specified position.
insertAdjacentHTML inserts the given HTML text into the element at the specified position.
insertAdjacentText inserts the given text at the specified position.
insertBefore inserts elements into the document hierarchy as child nodes of the parent object.
mergeAttributes Copies all read/write tag attributes to the specified element.
normalize Merges adjacent TextNode objects to generate a normal document object model.
removeAttribute Removes the given tag attribute of the object.
removeAttributeNode removes the attribute object from the object.
removeBehavior The behavior of detaching elements.
removeChild removes the child node from the element.
removeexpression_r Removes an expression from the specified attribute.
removeNode removes objects from the document hierarchy.
replaceAdjacentText Replaces the adjacent text of an element.
replaceChild replaces existing child elements with new ones.
replaceNode replaces objects with other elements.
scrollIntoView scrolls objects into the visible range and arranges them to the top or bottom of the window.
setActive sets the object as the current object without focusing the object.
setAttribute sets the value of the specified label attribute.
setAttributeNode sets the attribute object as part of the object.
setexpression_r sets the expression of the specified object.
swapNode swaps the positions of two objects in the document hierarchy.

Object

Object description
runtimeStyle represents the format and style of the object above the formats and styles specified by the global style sheet, inline styles, and HTML tag attributes.
style represents the current setting of all possible inline styles for a given element.

Style

Style tag attribute style attribute description
ACCELERATOR accelerator sets or gets a string indicating whether the object contains shortcut keys.
background-attachment backgroundAttachment sets or gets how the background image is attached to objects within the document.
background-color backgroundColor sets or gets the color of the object content.
background-position-x backgroundPositionX sets or gets the x coordinate of the backgroundPosition property.
background-position-y backgroundPositionY sets or gets the y coordinate of the backgroundPosition property.
behavior behavior Set or get the location of DHTML behavior.
border-bottom borderBottom sets or gets the properties of the object's bottom border.
border-bottom-color borderBottomColor sets or gets the color of the object's bottom border.
border-bottom-style borderBottomStyle sets or gets the style of the bottom border of the object.
border-bottom-width borderBottomWidth sets or gets the width of the bottom border of the object.
border-color borderColor sets or gets the border color of the object.
border-left borderLeft sets or gets the properties of the left border of the object.
border-left-color borderLeftColor sets or gets the color of the left border of the object.
border-left-style borderLeftStyle sets or gets the style of the left border of the object.
border-left-width borderLeftWidth sets or gets the width of the left border of the object.
border-right borderRight sets or gets the property of the right border of the object.
border-right-color borderRightColor sets or gets the color of the right border of the object.
border-right-style borderRightStyle sets or gets the style of the right border of the object.
border-right-width borderRightWidth sets or gets the width of the right border of the object.
border-style borderStyle sets or gets the style of the upper, lower, left and right borders of the object.
border-top borderTop sets or gets the properties of the upper border of the object.
border-top-color borderTopColor sets or gets the color of the border on the object.
border-top-style borderTopStyle sets or gets the style of the border on the object.
border-top-width borderTopWidth sets or gets the width of the border on the object.
border-width borderWidth sets or gets the width of the upper, lower, left and right borders of the object.
bottom bottom sets or gets the position of the object relative to the bottom of the next positioned object in the document hierarchy.
clear clear sets or gets whether the object allows floating objects to be placed on its left, right or both sides to prevent the following text from being displayed on the floating objects.
clip clip sets or gets which part of the positioned object is visible.
cursor cursor sets or gets the mouse pointer used when the mouse pointer points to the object.
display display sets or gets whether the object is to be rendered.
filter filter sets or gets the filter or filter collection applied to the object.
height height sets or gets the height of the object.
layout-grid layoutGrid sets or gets the combined document grid properties of the specified text character layout.
layout-grid-mode layoutGridMode sets or gets whether the text layout grid uses two dimensions.
left left sets or gets the position of the object relative to the left edge of the next positioned object in the document hierarchy.
margin margin sets or gets the top, bottom, left and right margins of the object.
margin-bottom marginBottom sets or gets the bottom margin width of the object.
margin-left marginLeft sets or gets the left margin width of the object.
margin-right marginRight sets or gets the right margin width of the object.
margin-top marginTop sets or gets the top margin width of the object.
overflow-x overflowX sets or gets how to manage object content when the content exceeds the width of the object.
overflow-y overflowY sets or gets how to manage object content when the content exceeds the object's height.
pixelBottom sets or gets the bottom position of the object.
pixelHeight sets or gets the height of the object.
pixelLeft sets or gets the left position of the object.
pixelRight sets or gets the right position of the object.
pixelTop sets or gets the top position of the object.
pixelWidth sets or gets the width of the object. posBottom sets or gets the position below the object in the unit specified by the bottom tag attribute.
posHeight sets or gets the height of the object in the unit specified by the height tag attribute.
position position sets or gets the positioning method used by the object.
posLeft sets or gets the left position of the object in the unit specified by the left tag attribute.
posRight sets or gets the right position of the object in the unit specified by the right tag attribute.
posTop sets or gets the position above the object in the unit specified by the top tag attribute.
posWidth sets or gets the width of the object in the unit specified by the width tag attribute.
right right Sets or gets the position of the object relative to the right boundary of the next positioned object in the document hierarchy.
float styleFloat sets or gets the side of the object to which the text should be wrapped.
text-autospace textAutospace Sets or gets automatic spacing and narrow space width adjustment of text.
top top sets or gets the position of the object relative to the upper boundary of the next positioned object in the document hierarchy.
visibility visibility sets or gets whether the content of the object is displayed.
z-index zIndex sets or gets the stacking order of positioned objects.
zoom zoom sets or gets the magnification ratio of the object.

Note

The IFRAME element is the document within the document, or like a floating frame (FRAME). The frames collection provides access to the IFRAME content. Please use the frames collection to read and write elements contained in IFRAME. For example, if you want to access the backgroundColor style of the body object in an iframe, the syntax should be:

sColor =document.frames("sFrameName").document.body.style.backgroundColor;

Through the object model of the page where the iframe object is located, you The properties of the iframe object can be accessed, but not its content. For example, the syntax to access the border style of an iframe object should be:

sBorderValue = document.all.oFrame.style.border;

Note that the properties of an iframe must be accessed using the prefix document.all, such as document.all.iframeId.marginWidth.
Internet Explorer 5.5 supports content transparency for floating frames. If you want to define transparent content for a floating frame, the following conditions must be met.

The ALLOWTRANSPARENCY tag attribute used with IFRAME elements must be set to true.
In the IFRAME content source document, the background-color or BGCOLOR tag attribute of the BODY element must be set to transparent.
See Using Transparent Floating Frames for more information on transparent floating frames.

This element is available in HTML and scripts in Microsoft® Internet Explorer 4.0.

This element is a block element.

This element requires a closing tag.

Example

The following example uses the IFRAME element to create a frame containing the page sample.htm.

The following example returns a reference to the all collection of documents contained in the IFRAME.

var collAll = document.frames("IFrame1").document.all


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Some small details of cssNext article:Some small details of css