-1
請幫忙。以下代碼運行良好,但創建重複值。我該如何解決這個問題。我想我把分裂功能放在錯誤的地方。比較數據並創建複選框
customer_choice=request.QueryString("customer_choice")
strSQL="Select distinct computer_name from item"
rs.Open strSQL, adoCon,1,1
rs.MoveFirst
while not rs.EOF
abc=split(customer_choice,",")
for i=0 to UBound(abc)
if rs("computer_name")=abc(i) then
response.Write("<input type='checkbox' id='c1' name='c1' value='" & rs("computer_name") & "' checked>" & rs("computer_name") & "</br></input>")
else
response.Write("<input type='checkbox' id='c1' name='c1' value='" & rs("computer_name") & "'>" & rs("computer_name") & "</br></input>")
end if
next
rs.MoveNext
wend
rs.Close