Java code
Js Code
Java code
<Script type = "text/javascript">
Function selectAll (){
For (var I = 0; I <document. form1.selectList. length; I ++ ){
Var until = document. form1.selectList [I];
Until. checked = document. form1.selected. checked;
}
}
Function testSelect (){
Var select = false;
For (var I = 0; I <document. form1.selectList. length; I ++ ){
If (document. form1.selectList [I]. checked ){
Select = true;
Break;
}
}
If (! Select ){
Alert ("You have not selected the record to delete! ");
}
Return select;
}
Function ss (){
Alert ("hello ");
}
</Script>
Java code
Html:
Java code
<Pre name = "code" class = "java"> <form action = "/deleted. jspx? Method = listDelete "name =" form1 "id =" form1 "onsubmit =" return testSelect (); "method =" post ">
<Table border = "1" class = "font">
<Tr> <td> <input type = "checkbox" id = "selected" name = "selected" onclick = "selectAll (); "/> NO. </td> <td width =" 10% "> problem summary </td> <td> problem type </td> <td> comment </td>
<Td> operation </td>
</Tr>
<# List as pro>
<Tr>
<Td> <input id = "selectList" name = "selectList" type = "checkbox" value = "$ {pro. proId} "/>$ {pro_index + 1} </td>
<Td >$ {pro. proDescrible} </td>
<Td >$ {pro. proType} </td>
<Td >$ {pro. review. content} </td>
<Td>
<A href = "/query. jspx? ProId =$ {pro. proId} "> View </a>
<A href = "/delete. jspx? ProId = $ {pro. proId} "onclick = 'Return (confirm (" are you sure you want to delete? "); '> Delete </a>
</Td>
</Tr>
</# List>
</Table> </pre>
Author: "cloud sorrow rain"