Jquery gets the content of all td in a row in table. For more information, see
The Code is as follows:
| 14 |
TopParty discount |
Select a role System AdministratorSystem Administrator 2System Administrator 3System Administrator 4System Administrator 5 |
Select permission SearchAccessCreateModify |
Add Delete |
Script
Function Bind (thisObj, thisObjID ){
Alert ("Bind ");
Var $ td = $ (thisObj). parents ('tr '). children ('td ');
// Alert ($ td. eq (0). text (); // content of the first td
// Alert ($ td. eq (1). text (); // the content of the second td
// Alert ($ td. eq (2). find ("select"). val (); // The value of selected for the content of the third td
// Alert ($ td. eq (3). find ("select"). val ());
Var resourceBlockID = $ td. eq (1 ). attr ("id"); // The ID value of the second Td, attr ("id"); get the Id value of this object
Var roleId = $ td. eq (2). find ("select"). val ();
Var operationId = $ td. eq (3). find ("select"). val ();
Alert ("resource Id" + resourceBlockID );
Alert ("role Id" + roleId );
Alert ("Operation ID" + operationId );
Var helptime = new Date (). getTime ();
}
Script