Managenews.asp
<% 'Database connection file I don't say%>
Function del () // Used to determine whether the record is selected
{
Var flag = true;
VAR TEMP = "";
VAR TMP;
IF ((Document.form1.answer.Length ") ==" undefined ") {TMP = 1} else {tmp = document.form1.answer.Length}
IF (TMP == 1) {
IF (Document.form1.answer.checked) {
Flag = false;
Temp = Document.form1.answer.Value
}
} else {
For (i = 0; i IF (Document.form1.answer [i] .checked) { IF (Temp == ") { Flag = false; Temp = Document.form1.answer [i] .value } else { Flag = false; Temp = Temp "," Document.form1.answer [i] .value } } } } IF (Flag) {Alert ("Sorry, you haven't chosen!")} Else {name = document.form1.name.value // alert (name) IF ("Do you want to delete?")) { WINDOW.LOCATION = "DELNEWS.ASP? ID =" TEMP; } } Return! Flag; } script> hEAD>
Function checkall (all) // is used to determine the function of the full selection record
{
VAR A = Document.GtelementsByname ("Answer");
For (var i = 0; i } script> <% SET RS = Server.createObject ("AdoDb.Recordset") SQL = "SELECT * from news order by addtime desc" RS.Open SQL, CONN, 1, 3%> <% IF r e%> No news! TR> table> <% ELSE%>