JavaScript Reference/Event Handlers Reference/onRowEnter

Материал из Web эксперт
Перейти к: навигация, поиск

"onRowEnter" Example

<title>Recordset Events</title>
<script language="javascript">
    function del(){
        if (myData.recordset.RecordCount > 0) 
<script for="myData" event="onrowenter">
    for (var i = 1; i <= myData.recordset.RecordCount; i++) {
       myTable.rows[i].style.backgroundColor = "red"; 
<input id=cmdDelete type="button" value="delete" onclick="del();">
<object classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" id="myData">
   <param name="DataURL" value="myfile.csv">
   <param name="UseHeader" value="True">
   <param name="TextQualifier" value=""">
       <td>First Name</td>
       <td><input id=firstname type=text datasrc=#myData datafld=firstname></td>
       <td>Last Name</td>
       <td><input id=lastname type=text datasrc=#myData datafld=lastname></td>
<table id=myTable datasrc=#myData>
      <tr style="font-weight:bold">
      <tr id="tableList">
         <td><span datafld="firstname"></span></td>
         <td><span datafld="lastname"></span></td>
<!-- myfile.csv  -->

"onRowEnter" is applied to

| Applied_To     |<applet>                        <object>                      |
|                |<xml>                                                         |

"onRowEnter" Properties

| Properties     |altKey                          altLeft                       |
|                |ctrlLeft                        qualifier                     |
|                |recordset                       returnValue                   |
|                |shiftLeft                       srcElement                    |
|                |type                                                          |

"onRowEnter" Syntax and Note

This event fires when a new row of data is selected in a databound object. 
The datasrc and datafld attributes must be set for the element to which the 
onRowEnter event handler is applied.
The value of the datasrc attribute must reference an object in the page.