Existem outras formas de fazer isso em JavaScript e até em outras linguagens, mas como tenho isso pronto, compartilho o que está mais fácil.
Bom proveito.
<%
'------------------------------------------------
car = request.form("car")
car2 = request.form("car2")
if car2 <> "" then
response.write ""
else
if car <> "" then
car = cInt(car)
response.write ""
else
if request.form("coluna") = "" then
limite = 10
else
limite = cInt(request.form("coluna"))
end if
end if
end if
'------------------------------------------------%>
<%
Response.buffer = true
'------------------------------------------------
response.write ""&vbcrlf
'------------------------------------------------
if car2 = "" then
if car = "" then
'------------------------------------------------
cont = 0
'------------------------------------------------
for i=1 to 255
'------------------------------------------------
if cont = 0 then
response.write ""&vbcrlf
cont = cont + 1
end if
'------------------------------------------------
if cont > 0 OR cont = limite then
response.write ""&vbcrlf
cont = cont + 1
end if
'------------------------------------------------
if cont = (limite+1) then
response.write ""&vbcrlf
cont = 0
end if
'------------------------------------------------
Next
'------------------------------------------------
response.write "
"& right("000"&i,3) &" = "& CHR(i) &"
"&VBCrlf
else
'------------------------------------------------
cont = 0
'------------------------------------------------
response.write ""&vbcrlf
response.write ""& right("000"&car,3) &" = "& CHR(car) &""&vbcrlf
response.write ""&vbcrlf
end if
else
'------------------------------------------------
for i=1 to 255
'------------------------------------------------
if car2 = CHR(i) then
response.write ""&vbcrlf&""& CHR(i) &" = "& right("000"&i,3) &""&vbcrlf&""
end if
'------------------------------------------------
Next
'------------------------------------------------
end if
'------------------------------------------------
response.write ""&VBCrlf
%>
<%=chr(171)%> Voltar
<%response.flush
response.clear%>
Nenhum comentário:
Postar um comentário