用Response对象的write方法和<%%>及<%=%>输出同样效果的乘法表格
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Response1.aspx.cs" Inherits="WebApplication1.Response1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><%--用<%%>及<%=%>输出乘法表--%></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border="" width="600px">
<tr><th colspan="">九九乘法表</th></tr>
<%
for (int i = ; i < ; i++)
{
%>
<tr>
<%
for (int j = ; j < ; j++)//输出一行的每列
{
if (j <= i)
{//如果没内容
%>
<td><%=j%>*<%=i%>=<%=i * j%></td>
<% }
else
{//否则输出空单元格
%>
<td> </td>
<% }
} %>
</tr>
<%
}
%>
</table>
</div>
</form>
</body>
</html>
-------------------------------------------------------------用<%%>和<%=%>输出的--------------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Response.aspx.cs" Inherits="WebApplication1.Response" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>用Response对象的Write方法<% %></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border="" width="600px">
<tr><th colspan="">九九乘法表</th></tr>
<%
for (int i = ; i < ; i++)
{
Response.Write("<tr>");
for (int j = ; j < ; j++)//输出一行中的每列
{
if (j <= i)
{//如果没有内容
Response.Write(string.Format("<td>{0}*{1}={2}</td>", j, i, j * i));
}
else
{//否则输出空格
Response.Write("<td> </td>");
}
}
Response.Write("</tr>");
}
%>
</table> </div>
</form>
</body>
</html>
用Response对象的write方法和<%%>及<%=%>输出同样效果的乘法表格的更多相关文章
- 通过response对象的sendRedirect方法重定向网页
通过response对象的sendRedirect方法重定向网页 制作人:全心全意 使用response对象提供的sendRedirect()方法可以将网页重定向到另一个页面.重定向操作支持将地址重定 ...
- 在springMVC的controller中获取request,response对象的一个方法
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttr ...
- 初识 Asp.Net内置对象之Response对象
Response对象 Respose对象用于将数据从服务器发送回浏览器.它允许将数据作为请求的结果发送到浏览器,并提供有光响应的信息,可以用来在页面中输入数据,在页面中跳转,还可以传递各个页面的参数, ...
- Response对象
Response对象来自HttpResponse类,它用于向客户端输出信息或设置客户端输出状态,使用Response对象可以直接发送信息给浏览器.重定向浏览器到另一个URL或设置cookie的值等. ...
- JSP具体条款——response对象
response对象 response为响应对象client要求.输出信息到客户.他封装JSP反应生成.发送client在回应client要求. 1.重定向网页 使用response对象的sendRe ...
- JSP具体篇——response对象
response对象 response对象用于响应client请求,向客户输出信息. 他封装了JSP产生的响应,并发送到client以响应client请求. 1.重定向网页 使用response对象的 ...
- JAVA-JSP内置对象之response对象实现页面自动跳转
相关资料:<21天学通Java Web开发> response对象 实现页面自动跳转1.可以通过response对象的addHeader()方法添加一个标题为Refresh的标头,并指定页 ...
- JAVA-JSP内置对象之response对象实现页面自动刷新
相关资料:<21天学通Java Web开发> response对象 实现页面自动刷新1.可以通过response对象的addIntHeader()方法添加一个标题为Refrsh的标头,并指 ...
- JAVA-JSP内置对象之response对象实现页面跳转
相关资料:<21天学通Java Web开发> response对象 实现页面跳转1.可以通过response对象的sendRedirect()方法设置页面重定向,从而实现页面跳转.2.这种 ...
随机推荐
- 使用java API查询java类
一.java API的下载地址 前面列举了常用的java类,但只是介绍了功能,具体详细的用法(比如要知道该类的属性和方法)要需要调用java的API(Application Program Inter ...
- EGit with eclipse to clone project from GitHub(Step by step)
转载请注明出处! 1. To find your project URL inside GitHub: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveWF ...
- iOS开发宝典:String用法大全
一.NSString 创建字符串. NSString *astring = @"This is a String!"; 创建空字符串,给予赋值. NSString *astri ...
- 如何解决Android 5.0中出现的警告:Service Intent must be explicit
有些时候我们使用Service的时需要采用隐私启动的方式,但是Android 5.0一出来后,其中有个特性就是Service Intent must be explitict,也就是说从Lollip ...
- java载入XML文件并解析xml
import java.io.File; import java.util.List; import org.dom4j.Document; import org.dom4j.DocumentExce ...
- 文件下载Demo
知识点: //获取用户要下载的资源的名称 string name=context.Request.Params["downloadName"]; //设 ...
- Error (0xc0000225) installing Windows 8 R2 on VirtualBox
Windows Boot Manager Windows failed to start. A recent hardware or software change might be the caus ...
- ASP.NET产生随机验证码
效果图:(Flowing) 1.项目中新建用于存储(位图)图片文件夹 图解: 2.前台可以添加一ASP.NET控件或其他任意用来展示图片标签等(如下) <div> <asp:Imag ...
- 1.3. chromium源代码分析 - chromiumframe - 窗口系列
在_tWinMain中有这样两条语句: MainWindowDelegate delegate; view::Window::CreateNativeWindow(NULL, gfx::Rect(), ...
- BZOJ 2662: [BeiJing wc2012]冻结(最短路)
这道题和 BZOJ 2763飞行路线 几乎一模一样..然后飞行路线我是1A,这道题WA了4次,我开始怀疑我的智商了.. ---------------------------------------- ...