javascript的记录号属性始终返回null。 我尝试过以下代码
<head>
<script type="text/javascript" for="myTr" event="onclick">
alert ("This is the " + this.recordNumber + ". record in the data set.");
</script>
<b>Click a row in the Table to get its recordNumber!<b>
<table width="100%" cellpadding="0px" cellspacing="2px" border="1px" datasrc="#movies" datapagesize="1" id="myTable">
<thead>
<tr>
<th>Name</th>
<th>Jobtitle</th>
<th>Born</th>
</tr>
</thead>
<tbody>
<tr id="myTr">
<td><span datafld="name"></span></td>
<td><span datafld="jobtitle"></span></td>
<td><span datafld="born"></span></td>
</tr>
</tbody>
</table>
<input type="button" onclick="myTable.firstPage ()" value="|< First " />
<input type="button" onclick="myTable.previousPage ()" value="< Previous " />
<input type="button" onclick="myTable.nextPage ()" value=" Next >" />
<input type="button" onclick="myTable.lastPage ()" value=" Last >|" />
我正在尝试使用iExplorer浏览器,但它没有按预期给出行号。 参考:http://help.dottoro.com/ljhqpfjc.php#supByObj