Select All js files and delete them in batches

Source: Internet
Author: User

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"
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.