當前位置:首頁 » 網頁前端 » 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實用網站開發課後習題答案

沒有你說的那本書
給你個建議,自己多敲代碼,打斷點調,這樣學習的效率很高