① 求救 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考試試題及答案
;