JQuery is a way to get the same level value. For example, if you are in the GridView, the implementation code is as follows. For more information, see
The Code is as follows:
You want to take the value in the hidden field after the selected checkbox, as follows:
The Code is as follows:
Function SelectReceipt ()
{
Var checknum = 0;
Var customerCode = "";
Var type = "";
Var url = "";
Checknum = $ ("input: checked"). length;
If (checknum> 1)
{
Alert ("only one record can be selected for collection! ");
Return false;
}
Else
{
Alert (checknum );
If (checknum = 1)
{
CustomerCode = $ ("input: checked "). next (). attr ("value"); // you can use the next () method to obtain the value of the next hdCustomerName. next (). next ().
// CustomerName = $ ("input: checked ~ # HdCustomerName "). val (); // the ID of IE will report an error, firefox will not
Type = $ ("input: checked ~. HdStatus "). attr (" value "); // or you can use the class method to obtain the value,
Url = 'prereceiptdeposit. aspx? CustomerCode = '+ customerCode +' & departmentType = '+ type;
}
Else
{
Url = 'prereceiptdeposit. aspx? CustomerCode = '+ ''+' & departmentType = '+ type;
}
Alert (url );
Universalopenwindowandbreak( 640,600, url, 1 );
Return true;
}
}
JQuery -- checkbox select all/cancel all
The Code is as follows: