HTML-DOM td / th cellIndex Eigenschaft
Definition und Verwendung
cellIndex Eigenschaft gibt die Zelllinie Sammelposition der Zelle.
Grammatik
Zurück cellIndex Eigenschaften:
tdObject.cellIndex
或者
thObject.cellIndex
或者
thObject.cellIndex
Tipp: cellIndex Eigenschaft hat keinen Standardwert.
Browser-Unterstützung
Alle gängigen Browser unterstützen cellIndex Eigentum
Beispiele
Beispiele
Pop-up-Position der Zelle (cellIndex):
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion displayResult (x) {
alert ( "Zellindex ist:" + x.cellIndex);
}
</ Script>
</ Head>
<Body>
<Table border = "1">
<Tr>
<Td onClick = "displayResult (this)"> Klicken Sie auf die Karte Zell Index </ td>
<Td onClick = "displayResult (this)"> Klicken Sie auf die Karte Zell Index </ td>
</ Tr>
</ Table>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion displayResult (x) {
alert ( "Zellindex ist:" + x.cellIndex);
}
</ Script>
</ Head>
<Body>
<Table border = "1">
<Tr>
<Td onClick = "displayResult (this)"> Klicken Sie auf die Karte Zell Index </ td>
<Td onClick = "displayResult (this)"> Klicken Sie auf die Karte Zell Index </ td>
</ Tr>
</ Table>
</ Body>
</ Html>
Versuchen »
td / th Objekte