当前位置:首页 » 网页前端 » web第三版课后题第十章答案
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

web第三版课后题第十章答案

发布时间: 2022-08-23 23:07:16

1. 应用web和matlab的信号与系统基础 第三版 课后习题答案

氯丙嗪与乙醇或中枢神经抑制药,尤其是与吸入全麻药或巴比妥类等静脉全麻药可彼此增效吩噻嗪类药的用量应减至常用量的 不是说有答案 嘛?为嘛 没得答案。

2. 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("您是成人了!");
}
}
}

【效果】

是这个么

3. 谁有web技术应用基础的课后答案

CH1 答案 一.填空题 1.通信 2.实现资源共享 3.局域网 广域网 4.资源子网 通信子网 二.选择题 DDBBCCA 三.简答题 1.答:所谓计算机网络,就是指以能够相互共享资源的方式互连起来的自治计算机系统的集合。 2.答:计算机网络技术的发展大...

4. C语言程序设计(第三版)第10章课后习题10.4答案

#include "stdio.h"
void main()
{
int a[11],i,j,n,k=0,*p;
for(i=0;i<11;i++)
a[i]=i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
a[10]=a[9];
p=a+9;
for(j=0;j<10;j++,p--)
{

if(p==&a[0])
*p=a[10];
else *p=*(p-1);
}
}
for(i=0;i<10;i++)
printf("%d ",a[i]);
}

5. 储久良编的web前端开发技术教材课后习题答案

6. Web程序设计:ASP.NET实用网站开发课后习题答案

没有你说的那本书
给你个建议,自己多敲代码,打断点调,这样学习的效率很高