<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function MainCheck(frm) {
if (frm.check.checked == true)
 CheckT(frm);
else
 CheckF(frm);
}

function CheckT(frm) {
for (i = 0; i < frm.chk.length; i++) {
 frm.chk[i].checked = true; 
 }
}

function CheckF(frm) {
for (i = 0; i < frm.chk.length; i++) {
 frm.chk[i].checked = false;
 }
}

function Del_list(){

var chk = document.getElementsByName("chk");
var data = "";

for (i=0;i<chk.length ;i++ )
{
  if (chk[i].checked == true )
  {
    data = data + "||" +chk[i].value;
  }
 }

document.frm.data.value = data;
document.frm.submit();

}
//-->
</SCRIPT>
</HEAD>
<BODY>
<form name="frm" method="post" action="b.asp">
<INPUT type="hidden" name="data">
<INPUT type="checkbox" name="check" onClick="MainCheck(this.form)">전부선택<br>
<INPUT type="checkbox" name="chk" value="id1">1번주문상품ID<br>
<INPUT type="checkbox" name="chk" value="id2">2번주문상품ID<br>
<INPUT type="checkbox" name="chk" value="id3">3번주문상품ID<br>
<INPUT type="checkbox" name="chk" value="id4">4번주문상품ID<br>
<INPUT type="checkbox" name="chk" value="id5">5번주문상품ID<br>
<br><button onclick="Del_list()">삭제하기</button>
</form>
</BODY>
</HTML>

===================================================================================

<%

data = request("data")

product = Split(data,"||")

For i =1 To UBound(product)
  Response.Write product(i) & "<Br>"
Next
%>

'asp' 카테고리의 다른 글

VBScript!!!와 ASP의 오류처리  (0) 2009.11.27
GetRows  (0) 2009.11.25
ASP 클래스 사용법  (0) 2009.11.18
ASP 클래스  (0) 2009.11.18
ASP DB 액세스 튜닝 사례 및 DBHelper 소개  (0) 2009.11.18

+ Recent posts