getCounterValue()
方法在
CSSPrimitiveValue
interface is used to get the
counter
value. If this CSS value doesn't contain a counter value, a
DOMException
is raised. Modification to the corresponding style property can be achieved using the
Counter
接口。
var counterValue = cssPrimitiveValue.getCounterValue();
A
Counter
object representing the counter value.
| 类型 | 描述 |
|---|---|
DOMException
|
An
INVALID_ACCESS_ERR
is raised if the CSS value doesn't contain a
Counter
value (e.g. this is not
CSS_COUNTER
).
|
| 规范 | 状态 | 注释 |
|---|---|---|
|
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSPrimitiveValue.getCounterValue' in that specification. |
过时 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getCounterValue
弃用
|
Chrome 不支持 No | Edge 不支持 No | Firefox 不支持 ? — 62 | IE ? | Opera 不支持 No | Safari ? | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 不支持 4 — 62 | Opera Android ? | Safari iOS ? | Samsung Internet Android 不支持 No |
不支持
兼容性未知
实验。期望将来行为有所改变。
弃用。不要用于新网站。
CSSPrimitiveValue
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
节点
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument