① 求救 Web应用开发技术题目
b b a b a d d a d a d b c b b 2 2 1 1 1
② Web应用开发技术题目 拜托了 做的好追加100分 谢谢
1-8 badabdab
9 ad 10 abcd 11 abcd 12 ac 13 c 14acd 15 a
16 2
17 1
18 1
19 1
20 2
我自己做的,不敢保证全对,如果你有答案的话发一份给我,谢谢...
③ 求web前端开发技术 储久良 第二版第五章实验答案,请尽量用HTML5写,因为目前只学到了这里,求高手解答
<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8"/>
<title></title>
<style>
*{margin:0;padding:0;}
li{list-style:none;}
h1{text-align:center;}
.box{width:860px;height:300px;margin:30pxauto;text-align:center;}
.boxli{width:200px;height:300px;margin-right:20px;float:left;}
.boxli:nth-child(4n){margin-right:0;}
.boxlidiv{width:200px;height:200px;background:blue;margin-bottom:10px;}
</style>
</head>
<body>
<h1>桂林山水风景图片</h1>
<ulclass="box">
<li><div><imgsrc="images/a.jpg"></div><ahref="">桂林山水1</a></li>
<li><div><imgsrc="images/a.jpg"></div><ahref="">桂林山水2</a></li>
<li><div><imgsrc="images/a.jpg"></div><ahref="">桂林山水3</a></li>
<li><div><imgsrc="images/a.jpg"></div><ahref="">桂林山水4</a></li>
</ul>
</body>
</html>
④ web程序设计 第三版 课后题答案 主编 吉根林 顾云华 [email protected]
Web程序设计第3章课后题
注:课后题共7题(除第一题和第九题),其中5和8由于还有些问题没有解决,就没有将答案附上。这里的答案仅供参考,希望在上机之前能自己练习一下。程序有很多地方可以改,不要照搬。
(2)设计一个网页,其中包含TextBox和Button控件各一个。当在TextBox中输入一个成绩,再单击Button控件时在网页上输出相应的等级信息。
【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question2.aspx.cs" Inherits="homework_chap3.question2" %>
<!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>
<asp:TextBox ID="TextBox1" runat="server">请输入一个成绩</asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="Label">待显示</asp:Label>
<br />
<asp:Button ID="Button1" runat="server" OnClick = "btmSubmit_Click" Text="检测" />
</div>
</form>
</body>
</html>
【.aspx.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace homework_chap3
{
public partial class question2 : System.Web.UI.Page
{
protected void btmSubmit_Click(object sender, EventArgs e)
{
int iInput = int.Parse(TextBox1.Text);
if (iInput > 100)
Label1.Text = "请输入正确的分数";
else if(iInput >= 90)
Label1.Text = "优秀";
else if (iInput >= 80)
Label1.Text = "良好";
else if (iInput >= 60)
Label1.Text = "及格";
else if (iInput >= 0)
Label1.Text = "不及格";
else
Label1.Text = "请输入正确的分数";
}
}
}
【效果】
(3)在网页上输出九九乘法表
【.aspx.cs】(.aspx源文件可以不作处理)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace homework_chap3
{
public partial class question3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
for (int i=1; i<= 9; i++)
{
for (int j = 1; j <= i; j++)
{
Response.Write(i + "*" + j + "=" + (i * j) + "");
}
Response.Write("</br>");
}
}
}
}
【效果】
(4)在网页上输出如下形状:
A
BBB
CCCCC
DDD
E
【.aspx.cs】(.aspx源文件可以不作处理)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace homework_chap3.questions
{
public partial class question4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String[] s = { "A", "B", "C", "D", "E" };
for (int i = 1; i <= 3; i++)
{
for (int j = 1; j <= 3 - i; j++)
{
Response.Write("");
}
for(int k = 1; k <= 2*i-1; k++)
{
Response.Write(s[i-1]);
}
Response.Write("</br>");
}
for (int i = 1; i < 3; i++)
{
for (int j = 1; j <= i; j++)
{
Response.Write("");
}
for (int k = 1; k <= 5 - 2*i; k++)
{
Response.Write(s[i + 2]);
}
Response.Write("</br>");
}
}
}
}
【效果】
(6)设计一个网页,其中包含两个TextBox和一个Button控件。当在TextBox中各输入一个数值,再单击Button控件时在网页上输出两者相除的数值。(要求包含异常处理)
【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question6.aspx.cs" Inherits="homework_chap3.questions.question6" %>
<!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>
<asp:Label ID="Label1" runat="server" Text="Label">输入一个除数:</asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Width="104px"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="Label">输入一个被除数:</asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Width="104px"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" OnClick="btm_click" Text="计算" />
<asp:Label ID="Label3" runat="server" Text="Label">答案</asp:Label>
</div>
</form>
</body>
</html>
【.aspx.ce】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace homework_chap3.questions
{
public partial class question6 : System.Web.UI.Page
{
protected void btm_click(object sender, EventArgs e)
{
int[] str = new int[1];
int iInput1 = int.Parse(TextBox1.Text);
int iInput2 = int.Parse(TextBox2.Text);
if (iInput2 == 0)
throw new Exception("除数不能为0");
else
Label3.Text = (iInput1 / iInput2).ToString();
}
}
}
【效果】
(7)设计一个用于用户注册页面的用户信息类UserInfo,它包括两个属性:姓名(Name)、生日(Birthday);一个方法DecideAge:用于判断用户是否达到规定年龄,对大于等于18岁的在页面上输出“您是成人了!”,而小于18岁的在页面上输出“您还没长大呢!”
【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question7.aspx.cs" Inherits="homework_chap3.questions.question71" %>
<!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>
<asp:Label ID="Label3" runat="server" Text="Label">注册</asp:Label>
<br /><br />
<asp:Label ID="Label1" runat="server" Text="Label">姓名</asp:Label>
<asp:TextBox ID="TextBox1" runat="server">如“朱晓栋”</asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="Label">生日</asp:Label>
<asp:TextBox ID="TextBox2" runat="server">如“19890411”</asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" OnClick="btm_click" Text="注册" />
</div>
</form>
</body>
</html>
【.aspx.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace homework_chap3.questions
{
public partial class question71 : System.Web.UI.Page
{
protected void btm_click(object sender, EventArgs e)
{
int iInput2 = int.Parse (TextBox2.Text);
question7 que = new question7("zhu",19890411);
que.DecideAge(iInput2);
}
}
}
【.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace homework_chap3.questions
{
public class question7
{
private string _Name;
private int _Brithday;
public string Name
{
get
{
return this._Name;
}
set
{
this._Name = value;
}
}
public int Brithday
{
get
{
return this._Brithday;
}
set
{
this._Brithday = value;
}
}
public question7(String name, int brithday)
{
this._Name = name;
this._Brithday = brithday;
}
public void DecideAge(int brithday)
{
if (20101001 - brithday < 180000)
throw new Exception("您还没长大呢!");
else
throw new Exception("您是成人了!");
}
}
}
【效果】
是这个么
⑤ web程序设计asp.net实用网站开发 第2版 课后习题答案(沈士根版)
先分析原因。
你出现这个错误是因为你没有了解ASP.NET的工作原理。ASP.Net 和php,jsp ,asp等服务器语言一样 都是为了生成可供浏览器解析的页面,而可供浏览器解析的语言只有HTML。
1,如果你在aspx页面中插入一个asp:LinkButton 那么运行页面后 在浏览器中查看源代码你会发现这个标签实际被转为了一个<a>标签。
2,为什么你的写法不会转换呢?因为首先 传递给Literal1.Text 的值在asp.net中作为一段字符串被直接输出到浏览器中。那么你的写法到浏览器后源代码中仍然是一个asp:LinkButton 标签,而这个标签是无法被浏览器正确解析的。
解决办法:
知道了原因,那么如果非要按照你的写法去写,那么应该是这样的:
Literal1.Text = "<li>" + ((users)Session["users"]).Name.ToString() + "</li><li> </li><li><a ID='LinkButton1' onclick='LinkButton1_Click1'>注销</a></li><li> </li><li>信息修改</li><li> </li>";
但是当你修改完后发现点击注销按钮依然不能执行!为什么呢?
因为你的LinkButton1_Click1 事件并没有在asp.net中被解析为可供浏览器识别的js代码。
如何解决?
在aspx页面中写一个asp:LinkButton按钮:
<asp:LinkButton ID='LinkButton2' runat='server' onclick='LinkButton1_Click1'>注销</asp:LinkButton>
运行页面,查看源代码 看看这个新加的注销按钮被解析为了什么html代码,大概如下
<a id="LinkButton2" onclick="xxxxx"></a>
将新加的linkbutton 设置不可见属性
<asp:LinkButton ID='LinkButton2' runat='server' visible="false" onclick='LinkButton1_Click1'>注销</asp:LinkButton>
重新修改后台代码
Literal1.Text = "<li>" + ((users)Session["users"]).Name.ToString() + "</li><li> </li><li><a ID='LinkButton1' onclick='xxxxx'>注销</a></li><li> </li><li>信息修改</li><li> </li>";
//也就是将标签的js事件绑定到那个隐藏的注销按钮事件上。
希望对你有帮助
⑥ 计算机二级《Web程序设计》试题及答案
计算机二级《Web程序设计》试题及答案
1在下列的HTML中,正确产生超链接的标记是()。
A.新浪网B.新浪网C.http:///WWW.sina.Corn.cnD.新浪网
参考答案:B
2下面协议中用于在Web浏览器和服务器之间传输Web文档的是()。
A.NFSB.FTPC.HTTPD.DNS
参考答案:C
3在HTTP响应的MIME消息体中,可以同时包含如下类型的数据()。
i .文本数据 ii.图片数据 iii.视频数据 iv.音频数据
A.仅iB.i和iiC.i、ii和iiiD.全都可以
参考答案:D
4HTTP协议是一种()协议。
A.文件传输协议B.邮件协议C.远程登录协议D.超文本传输协议
参考答案:D
5在HTML文档中使用的注释符号是()。
A.//…B./*……*/C.D.以上说法均错误
参考答案:C
6HTTP请求消息中可以不包含()。
i.开始行 ii.消息头iii.消息体实体数据
A.仅iB.i和iiC.ii和 iiiD.仅iii
参考答案:C
7下列技术中控制文档结构的.是()。
A.DOMB.CSSC.JavaScriptD.XMLHttpRequest
参考答案:A
8下列语言编写的代码中,在浏览器端执行的是()。
A.wt h页面中的c#代码
B.Web页面中的Java代码
C.Web页面中的PHP代码
D.Web页面中的JavaScript代码
参考答案:D
9在HTTP/1.1协议中,持久连接选项是()的。
A.默认关闭B.默认打开C.不可协商D.以上都不对
参考答案:B
10以下不是HTTP协议的特点的是()。
A.持久连接B.请求/响应模式C.只能传输文本数据D.简单、高效
参考答案:C
11下列语句中,正确打开名为“window2"的新窗口的JavaScript语句是()。
A.open.new("http://www.sina.COB.cn","window2")
B.new.window("http://www.sina.con.cn","window2")
C.new("http://www.sina.com.cn","window2")
D.window.open("http://www.sina.tom.cn","window2")
参考答案:D
12以下选项中,全部都是表格标记的是()。
参考答案:B
13下列关于ASP.NET的描述中,错误的是()。
A.ASP.NET依赖于微软的.NET框架
B.ASP.NET采用纯面向对象语言比采用脚本语言的执行效率高
C.ASP.NET采用代码分离技术有利于开发协作
D.ASP.NET和ASP都采用了JavaScript编程语言
参考答案:D
14下列函数中能够把6.25四舍五入为最接近的整数的是()。
A.round(6.25)B.rnd(6.25)C.Math.rnd(6.25)D.Math.round(6.25)
参考答案:D
15目前在Internet上应用最为广泛的服务是()。
A.FTP服务B.Web服务C.Telnet服务D.Gopher服务
参考答案:B
16下列正确地在CSS文件中插入注释的语句是()。
A.//this is a commentB.//this is a comment//C./*this is a comment*/D.'this is a comment
参考答案:C
17下列不属于动态网页格式的是()。
A.ASPB.JSPC.ASPXD.VBS
参考答案:D
18以下语句中,正确制作电子邮件链接的是()。
参考答案:C
19下列哪个样式能够显示这样一个边框:上边框10像素、下边框5像素、左边框20像素、右边框l像素?()
A.border—width:10px 5px 20px 1px
B.border—width:10px 20px 5px 1px
C.border—width:5px 20px l0px 1px
D.border—width:10px 1px 5px 20px
参考答案:D
20CSS 主要用下列哪个HTML标记构建页面布局?()
参考答案:B
21在下列选项中,正确地产生文本区(textarea)的标记是()。
参考答案:A
22在访问的URL http://Cms.bit.e.Cn:8080/login.aspx中,http表示()。
A.端口号B.文件名C.访问协议D.主机名
参考答案:C
23下列标记中不属于行内元素的是()。
参考答案:D
24在HTML文档中用于表示页面标题的标记对是()。
参考答案:D
25下列符合CSS语法的正确语句是()。
A.body:color=blackB.{body;color:black}C.body{color:black;}D.{body:color=black}
参考答案:C
更多计算机二级试题推荐:
1. 2016年9月计算机二级web考试试题及答案
2. 计算机二级《Web程序设计》试题及答案
3. 计算机二级考试WEB试题及答案
4. 2016计算机二级考试《Web程序设计》练习题模拟
5. 2016计算机二级考试高级Office试题及答案
6. 2016最新计算机二级考试试题及答案
7. 2016年计算机二级office高级应用试题【题库】
8. 2016计算机二级等级考试题型分析
9. 2016下半年计算机二级ps试题及答案
10. 计算机二级Office考试试题及答案
;