HTML DOM tr ch Property
body { font-family: Arial, sans-serif; line-height: 1.6; max-width: 1000px; margin: 0 auto; padding: 20px; }
header { border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-bottom: 20px; }
nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
nav a { text-decoration: none; color: #333; background: #f4f4f4; padding: 5px 10px; border-radius: 4px; font-size: 0.9em; }
h1 { color: #d9534f; }
h2 { border-left: 5px solid #d9534f; padding-left: 10px; margin-top: 30px; }
ul { list-style-type: disc; padding-left: 20px; }
li { margin-bottom: 5px; }
pre, code { background-color: #f5f5f5; padding: 10px; border: 1px solid #ddd; overflow-x: auto; display: block; white-space: pre; }
.example-note { background-color: #ffffcc; border: 1px solid #ffebcd; padding: 10px; margin-top: 15px; }
.ad-box { border: 1px solid #eee; padding: 15px; margin: 20px 0; background: #fafafa; }
footer { border-top: 1px solid #ddd; padding-top: 20px; margin-top: 40px; font-size: 0.85em; color: #666; }
.sidebar { float: right; width: 250px; margin-left: 20px; margin-bottom: 20px; }
@media screen and (max-width: 700px) { .sidebar { float: none; width: auto; margin: 0 0 20px 0; } }
JavaScript Reference Manual
Overview
tr ch Property
tr Object
Definition and Usage
The ch property can set or return the alignment character for cells in the row.
All cell contents in the same column align depending on this character.
Syntax
Set ch property:
trObject.ch = "text"
Return ch property:
trObject.ch
Tip: The ch property has no default value.
Browser Support
All mainstream browsers support the ch property, however, none of the mainstream browsers implement this feature.
Example
Align the column of "Savings":
function displayResult(){
var c=document.getElementById("myCol");
alert("The alignment character of the second column is:" + c.ch);
}
| Month |
Deposit |
| January |
$100.00 |
| February |
$10.00 |
Note:Not all mainstream browsers support the char attribute.
Try it Yourself »
Explore Further
- script
- Web Browser
- Scripting Language
- Script
- Computer
- Network Design & Development
- Programming Language
- Development Tools
- Web Services
ByteArc Coding Plan
Supports Doubao, GLM, DeepSeek, Kimi, MiniMax, and other mainstream LLMs. Official direct supply, stable and reliable.
Β₯9.9 / Month Activate Now
Xunfei Starlight Coding Plan
Includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform.
Β₯3.9 / Month Activate Now
Click to share notes