EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.
1 sur 4 ont trouvé cela utile - Évaluez ce sujet

xmp element | xmp object

This element is obsolete and should no longer be used. Use CSS font or whiteSpace instead.

Renders text used for examples in a fixed-width font.

HTML information

Closing Tagrequired
CSS Displayinline

DOM Information

Inheritance Hierarchy

 Node
  Element
    xmp

Members

The xmp object has these types of members:

Methods

The xmp object has these methods.

MethodDescription
applyElement

Makes the element either a child or parent of another element.

blur

Causes the element to lose focus and fires the onblur event.

clearAttributes

Removes all attributes and values from the object.

click

Simulates a click by causing the onclick event to fire.

componentFromPoint

Returns the component located at the specified coordinates via certain events.

contains

Checks whether the given element is contained within the object.

doScroll

Simulates a click on a scroll bar component.

focus

Causes the element to receive the focus and executes the code specified by the onfocus event.

getAttribute

Retrieves the value of the specified attribute.

getBoundingClientRect

Retrieves an object that specifies the bounds of a collection of TextRectangle objects.

getClientRects

Retrieves a collection of rectangles that describes the layout of the contents of an object or range within the client. Each rectangle describes a single line.

getElementsByClassName

Gets a collection of objects that are based on the value of the class attribute.

getElementsByTagName

Retrieves a collection of objects based on the specified element name.

hasAttributes

Determines whether one or more attributes exist for the object.

mergeAttributes

Copies all read/write attributes to the specified element.

msMatchesSelector

Determines whether an object matches the specified selector.

removeAttribute

Removes an attribute from an object.

replaceAdjacentText

Replaces the text adjacent to the element.

setActive

Sets the object as active without setting focus to the object.

setAttribute

Sets the value of the specified attribute.

 

Properties

The xmp object has these properties.

PropertyDescription

accessKey

Sets or retrieves the access key for the object.

ATOMICSELECTION

Specifies whether the element and its contents must be selected as a whole, indivisible unit.

attributes

Retrieves a collection of attributes of the object.

canHaveChildren

Gets a value indicating whether the object can contain child objects.

canHaveHTML

Retrieves the value indicating whether the object can contain rich HTML markup.

className

Sets or retrieves the class of the object.

clear

Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.

clientHeight

Retrieves the height of the object including padding, but not including margin, border, or scroll bar.

clientLeft

Retrieves the distance between the offsetLeft property and the true left side of the client area.

clientTop

Retrieves the distance between the offsetTop property and the true top of the client area.

clientWidth

Retrieves the width of the object including padding, but not including margin, border, or scroll bar.

contentEditable

Sets or retrieves the string that indicates whether the user can edit the content of the object.

dir

Sets or retrieves the reading order of the object.

hideFocus

Sets or gets the value that indicates whether the object visibly shows that it has focus.

id

Sets or retrieves the string identifying the object.

innerHTML

Sets or retrieves the HTML between the start and end tags of the object.

innerText

Sets or retrieves the text between the start and end tags of the object.

isContentEditable

Gets the value that indicates whether the user can edit the contents of the object.

isDisabled

Gets the value that indicates whether the user can interact with the object.

isMultiLine

Retrieves the value indicating whether the content of the object contains one or more lines.

lang

Sets or retrieves the language to use.

language

Sets or retrieves the language in which the current script is written.

Note  This has been superceded by the type attribute for the script element. If you are using javascript alone, you don't need to specify a type or language with the script element.

offsetHeight

Retrieves the height of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetLeft

Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetParent

Retrieves a reference to the container object that defines the offsetTop and offsetLeft properties of the object.

offsetTop

Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetWidth

Retrieves the width of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

outerHTML

Sets or retrieves the object and its content in HTML.

outerText

Sets or retrieves the text of the object.

readyState

Retrieves the current state of the object.

role

Sets or retrieves the role for this element.

scrollHeight

Retrieves the scrolling height of the object.

scrollLeft

Sets or retrieves the distance between the left edge of the object and the leftmost portion of the content currently visible in the window.

scrollTop

Sets or retrieves the distance between the top of the object and the topmost portion of the content currently visible in the window.

scrollWidth

Retrieves the scrolling width of the object.

sourceIndex

Retrieves the ordinal position of the object, in source order, as the object appears in the document's all collection.

STYLE

Sets an inline style for the element.

tabIndex

Sets or retrieves the index that defines the tab order for the object.

tagName

Retrieves the tag name of the object.

tagUrn

Sets or gets the URN specified in the namespace declaration.

This property is not supported for Windows Store apps using JavaScript.

title

Sets or retrieves advisory information (a ToolTip) for the object.

uniqueID

Retrieves an autogenerated, unique identifier for the object.

uniqueNumber

Retrieves the element's unique number.

 

Standards information

There are no standards that apply here.

Remarks

Use of this element is no longer recommended. Use the PRE or SAMP element instead.

HTML elements within an XMP element render as text, not as HTML-formatted elements.

See also

tt

 

 

Build date: 11/28/2012

Ajouts de la communauté

AJOUTER
© 2013 Microsoft. Tous droits réservés.