iaColSpan - Web APIs | MDN
Có thể bạn quan tâm
- Skip to main content
- Skip to search
Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
- Learn more
- See full compatibility
- Report feedback
The ariaColSpan property of the Element interface reflects the value of the aria-colspan attribute, which defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
In this article
- Value
- Examples
- Specifications
- Browser compatibility
- See also
Value
A string which contains an integer.
Examples
In this example the aria-colspan attribute on the element with an ID of spanning-heading is set to "2". Using ariaColSpan we update the value to "3".
html<table> <thead> <tr> <th>Heading 1</th> <th>Heading 2</th> <th>Heading 3</th> </tr> </thead> <tbody> <tr> <td colspan="2" aria-colspan="2" id="spanning-column">Spanning</td> <td>One</td> </tr> </tbody> </table> jslet el = document.getElementById("spanning-column"); console.log(el.ariaColSpan); el.ariaColSpan = "3"; console.log(el.ariaColSpan);Specifications
| Specification |
|---|
| Accessible Rich Internet Applications (WAI-ARIA)# dom-ariamixin-ariacolspan |
Browser compatibility
See also
- ARIA: table role
Help improve MDN
Was this page helpful to you? Yes No Learn how to contributeThis page was last modified on Nov 3, 2025 by MDN contributors.
View this page on GitHub • Report a problem with this content Filter sidebar- Document Object Model (DOM)
- Element
- Instance properties
- ariaActiveDescendantElement
- ariaAtomic
- ariaAutoComplete
- ariaBrailleLabel
- ariaBrailleRoleDescription
- ariaBusy
- ariaChecked
- ariaColCount
- ariaColIndex
- ariaColIndexText
- ariaColSpan
- ariaControlsElements
- ariaCurrent
- ariaDescribedByElements
- ariaDescription
- ariaDetailsElements
- ariaDisabled
- ariaErrorMessageElements
- ariaExpanded
- ariaFlowToElements
- ariaHasPopup
- ariaHidden
- ariaInvalid
- ariaKeyShortcuts
- ariaLabel
- ariaLabelledByElements
- ariaLevel
- ariaLive
- ariaModal
- ariaMultiLine
- ariaMultiSelectable
- ariaOrientation
- ariaOwnsElements
- ariaPlaceholder
- ariaPosInSet
- ariaPressed
- ariaReadOnly
- ariaRelevant Non-standard
- ariaRequired
- ariaRoleDescription
- ariaRowCount
- ariaRowIndex
- ariaRowIndexText
- ariaRowSpan
- ariaSelected
- ariaSetSize
- ariaSort
- ariaValueMax
- ariaValueMin
- ariaValueNow
- ariaValueText
- assignedSlot
- attributes
- childElementCount
- children
- classList
- className
- clientHeight
- clientLeft
- clientTop
- clientWidth
- currentCSSZoom
- elementTiming Experimental
- firstElementChild
- id
- innerHTML
- lastElementChild
- localName
- namespaceURI
- nextElementSibling
- outerHTML
- part
- prefix
- previousElementSibling
- role
- scrollHeight
- scrollLeft
- scrollLeftMax Non-standard
- scrollTop
- scrollTopMax Non-standard
- scrollWidth
- shadowRoot
- slot
- tagName
- Instance methods
- after()
- animate()
- append()
- ariaNotify() Experimental Non-standard
- attachShadow()
- before()
- checkVisibility()
- closest()
- computedStyleMap()
- getAnimations()
- getAttribute()
- getAttributeNames()
- getAttributeNode()
- getAttributeNodeNS()
- getAttributeNS()
- getBoundingClientRect()
- getClientRects()
- getElementsByClassName()
- getElementsByTagName()
- getElementsByTagNameNS()
- getHTML()
- hasAttribute()
- hasAttributeNS()
- hasAttributes()
- hasPointerCapture()
- insertAdjacentElement()
- insertAdjacentHTML()
- insertAdjacentText()
- matches()
- moveBefore()
- prepend()
- querySelector()
- querySelectorAll()
- releasePointerCapture()
- remove()
- removeAttribute()
- removeAttributeNode()
- removeAttributeNS()
- replaceChildren()
- replaceWith()
- requestFullscreen()
- requestPointerLock()
- scroll()
- scrollBy()
- scrollIntoView()
- scrollIntoViewIfNeeded() Non-standard
- scrollTo()
- setAttribute()
- setAttributeNode()
- setAttributeNodeNS()
- setAttributeNS()
- setCapture() Non-standard Deprecated
- setHTML() Experimental
- setHTMLUnsafe()
- setPointerCapture()
- toggleAttribute()
- Events
- afterscriptexecute Non-standard Deprecated
- animationcancel
- animationend
- animationiteration
- animationstart
- auxclick
- beforeinput
- beforematch
- beforescriptexecute Non-standard Deprecated
- beforexrselect Experimental
- blur
- click
- compositionend
- compositionstart
- compositionupdate
- contentvisibilityautostatechange
- contextmenu
- copy
- cut
- dblclick
- DOMActivate Deprecated
- DOMMouseScroll Non-standard Deprecated
- focus
- focusin
- focusout
- fullscreenchange
- fullscreenerror
- gesturechange Non-standard
- gestureend Non-standard
- gesturestart Non-standard
- gotpointercapture
- input
- keydown
- keypress Deprecated
- keyup
- lostpointercapture
- mousedown
- mouseenter
- mouseleave
- mousemove
- mouseout
- mouseover
- mouseup
- mousewheel Non-standard Deprecated
- MozMousePixelScroll Non-standard Deprecated
- paste
- pointercancel
- pointerdown
- pointerenter
- pointerleave
- pointermove
- pointerout
- pointerover
- pointerrawupdate
- pointerup
- scroll
- scrollend
- scrollsnapchange Experimental
- scrollsnapchanging Experimental
- securitypolicyviolation
- touchcancel
- touchend
- touchmove
- touchstart
- transitioncancel
- transitionend
- transitionrun
- transitionstart
- webkitmouseforcechanged Non-standard
- webkitmouseforcedown Non-standard
- webkitmouseforceup Non-standard
- webkitmouseforcewillbegin Non-standard
- wheel
- Inheritance
- Node
- EventTarget
- Related pages for DOM
- AbortController
- AbortSignal
- AbstractRange
- Attr
- CDATASection
- CharacterData
- Comment
- CustomEvent
- DOMError Deprecated
- DOMException
- DOMImplementation
- DOMParser
- DOMTokenList
- Document
- DocumentFragment
- DocumentType
- Event
- EventTarget
- HTMLCollection
- MutationObserver
- MutationRecord
- NamedNodeMap
- Node
- NodeIterator
- NodeList
- ProcessingInstruction
- QuotaExceededError Experimental
- Range
- ShadowRoot
- StaticRange
- Text
- TreeWalker
- XMLDocument
- XPathEvaluator
- XPathExpression
- XPathResult
- XSLTProcessor
- Guides
- Anatomy of the DOM
- Attribute reflection
- Selection and traversal on the DOM tree
- Building and updating the DOM tree
- Working with events
Từ khóa » Html Colspan Javascript
-
HTML DOM TableData ColSpan Property - W3Schools
-
HTML Td Colspan Attribute - W3Schools
-
ColSpan Property (td, Th) JavaScript - Dottoro Web Reference
-
Set Colspan/rowspan For A Cell - Javascript - Stack Overflow
-
Javascript Reference - HTML DOM TableData ColSpan Property
-
Javascript DOM TableData Get And Set Column Span Property
-
Table Rowspan And Colspan In HTML Explained (With Examples) »
-
HTML Colspan Attribute - HTML Tutorials - W3resource
-
HTML Colspan Attribute
-
The Table Element - HTML: HyperText Markup Language | MDN
-
HTML | DOM TableData ColSpan Property - GeeksforGeeks
-
HTML DOM TableHeader ColSpan Property - GeeksforGeeks
-
HTML Th Colspan Attribute - W3Schools
-
How To Change Colspan=“6” To Colspan =“4” In TD Using JQuery ...