test_bug1297.html (1322B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1297 5 --> 6 <head> 7 <title>Test for Bug 1297</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1297">Mozilla Bug 1297</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 <table border=1> 16 <tr> 17 <td id="td1" onmousedown="alert(this.cellIndex)">cellIndex=0</td> 18 <td id="td2" onmousedown="alert(this.cellIndex)">cellIndex=1</td> 19 <td id="td3" onmousedown="alert(this.cellIndex)">cellIndex=2</td> 20 <tr id="tr1" 21 onmousedown="alert(this.rowIndex)"><td>rowIndex=1<td>rowIndex=1<td>rowIndex=1</t 22 r> 23 <tr id="tr2" 24 onmousedown="alert(this.rowIndex)"><td>rowIndex=2<td>rowIndex=2<td>rowIndex=2</t 25 r> 26 </tr> 27 </table> 28 </div> 29 <pre id="test"> 30 <script class="testbody" type="text/javascript"> 31 32 /** Test for Bug 1297 */ 33 is($('td1').cellIndex, 0, "cellIndex / rowIndex working td1"); 34 is($('td2').cellIndex, 1, "cellIndex / rowIndex working td2"); 35 is($('td3').cellIndex, 2, "cellIndex / rowIndex working td3"); 36 is($('tr1').rowIndex, 1, "cellIndex / rowIndex working tr1"); 37 is($('tr2').rowIndex, 2, "cellIndex / rowIndex working tr2"); 38 39 40 41 42 </script> 43 </pre> 44 </body> 45 </html>