动态网页设计中,用respones.write方法输出一个n行m列的表格,并在每个单元格中显示该单元的行号和列号
展开全部
<table>
<%
'10行10列
n=10
m=10
for i=1 to m
response.write "<tr>"
for j=1 to n
response.write "<td>" & i & "," & j & "</td>"
next j
response.write "</tr>"
next i
%>
</table>
<%
'10行10列
n=10
m=10
for i=1 to m
response.write "<tr>"
for j=1 to n
response.write "<td>" & i & "," & j & "</td>"
next j
response.write "</tr>"
next i
%>
</table>
追问
如果m,n的值是用户自己输入的要如何做呢
追答
ASP传递参数
1、链接传递
>确认删除
服务经验交流
&db=&title=&rightsfile=>编 辑
&rq=>编辑
帖子主题:"&rs("topic")&" "&rs("time")&" "%>
2、表单传递
method=post>
3、数据库传递
db=Request.QueryString("db")
set rs=server.createobject("adodb.recordset")
rs.open "SELECT * FROM "&db&" where id="&id,Conn,1,1
rs1.Open "delete from "&db&" where id="&id,conn,1,1
rs2.open "update "&db&" set answer=answer-1 where id=" & rs("topid"),conn,1,1
4、session值的定义与使用
使用方法:
if session("pass")="1" then
Response.Redirect("xsdf.asp")
else
Response.Redirect "error.htm"
end if
%>
你可以用以上方法传递参数
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询