HTML DOM Ol reversed property
Definition and Usage
reversed property sets or returns whether the list in descending order.
When set to true, the list is in descending order (9, 8, 7 ...), rather than ascending order (1, 2, 3 ...).
Browser Support
In addition to Internet Explorer, the other major browsers support reversed attribute.
Note: Safari 5 and earlier versions do not support reversed attribute.
grammar
Back reversed attributes:
olObject .reversed
Setting reversed properties:
olObject .reversed=true|false
Property Value
值 | 描述 |
---|---|
true|false |
规定列表是否为降序。
|
technical details
return value: | Boolean value that, if the list is in descending order, then returns true, otherwise returns false. |
---|
More examples
Examples
Detecting whether the list in descending order:
var x = document.getElementById("myOl").reversed;
x The output is:
false
try it"
related articles
HTML Reference Manual: HTML <OL> the reversed attribute