Windows-Apps
Inhaltsverzeichnis reduzieren
Inhaltsverzeichnis erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

cols attribute | cols property

Sets or retrieves the number of columns in the table.

Syntax

HTML<element cols="nColumns" ... >
JavaScript

nColumns = object.cols

 

Property values

Type: Integer

the number of columns.

Standards information

Remarks

Specifying this number can speed up the processing of the table.

Examples

This example uses the cols attribute and the cols property to set the number of columns in HTML and retrieve the number of columns in script.


<script type="text/javascript">
function checkCols(oObject)
{
    var iColumns = oObject.cols;
    alert (iColumns);
}
</script>
</head>
<body>
<table id=oTable border cols="3" onclick="checkCols(this)">
<tr><td>Column 1</td><td>Column 2</td><td>Column 3</td></tr>
</table>

See also

table

 

 

Anzeigen:
© 2016 Microsoft