JavaScript Reference/Event Handlers Reference/onRowExit

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

"onRowExit" Example

   <source lang="javascript">
   

<html> <head> <title>Recordset Events</title> <script language="javascript">

   function del(){
       if (myData.recordset.RecordCount > 0) 
           myData.recordset.Delete();
   }

</script> <script for="myData" event="onrowexit">

   for (var i = 1; i <= myData.recordset.RecordCount; i++) {
      myTable.rows[i].style.backgroundColor = "red"; 
   } 

</script> </head> <body> <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=""">

</object>

First Name <input id=firstname type=text datasrc=#myData datafld=firstname>
Last Name <input id=lastname type=text datasrc=#myData datafld=lastname>
<thead> </thead> <tbody> </tbody>
First Last

</body> </html>



     </source>
   
  


"onRowExit" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<applet> <object> | | |<xml> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"onRowExit" Properties

   <source lang="javascript">

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

     </source>
   
  


"onRowExit" Syntax and Note

   <source lang="javascript">

Note:

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


     </source>