導航:首頁 > 萬維百科 > asp網頁綜合設計

asp網頁綜合設計

發布時間:2020-11-28 09:10:22

1、急急急!ASP期末大作業 利用網頁設計的常用軟體工具DREAMWEAVER,採用ASP+ACCESS技術製作一個綜合性的網站

可以憑借Baihi告知我們
有機會能夠處理你所遇到的工作
相關的要求也能夠告知我們
急急急!回ASP期末大** 利用網頁**的常用答軟體工具DREAM...
ES:\\

2、asp動態網頁設計

很簡單,用session不可以了嗎
例:login.asp
<%
if session("error")<>"" then
response.write session("error") '錯誤信息
end if
%>
<input type="submit" name="send" <%if session("count")>3 then%> disabled="disabled" <%end if%> value="登錄" /> 判斷錯誤次數

Check.asp

if session("count")="" then '設定登錄次數
session("count")=1
else
if session("count")>3 then
response.write "<script>window.history.back();</script>" '正常不會提交,但還是要防範於未然,直接返回不給提示
else
session("count")=session("count")+1
end if
end if

if request.form("name")="" then

session("error")="用戶名不能為空"
response.redirect("login.asp")
response.end()

elseif request.form("password")="" then

session("error")="密碼不能為空"
response.redirect("login.asp")
response.end()

end if

'判斷資料庫中是否有該用戶名密碼或是否正確
if rs.eof then

session("error")="用戶名或密碼錯誤!"
response.redirect("login.asp")
response.end()

end if

別忘登錄成功清空session,以防重新
session("error")=""
session("count")=""

3、asp網頁設計

首先,聲明,不需要oldword及newword
數據表中,我用.Username 和 Password
傳遞參數,我用Username Password 和 NewPassword
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Connstr="DBQ="+server.mappath("bookstore.asp")+";DefaultDir=;Driver={Microsoft Access Driver (*.mdb)}; DriverId=25; FIL=MS Access; ImplicitCommitSync=Yes;MaxBufferSize=512; MaxScanRows=8; PageTimeout=5; SafeTransactions=0; Threads=3; UserCommitSync=Yes; uid=; pwd=;"
Conn.Open Connstr
%>
<%
Username=request("Username")
Password=request("Password")
NewPassword=request("NewPassword")
SQL="select * from employeeinformation where UserName='"&Username&"'"
Set Rs=conn.Execute(SQL)
If Rs.Eof Or Rs.Bof then
Response.write("用戶名不存在")
Rs.close
Conn.close
Set Rs=nothing
Set Conn=nothing
Response.end
end if
If Password <> Rs("Password") then
response.write("用戶密碼錯誤")
Rs.close
Conn.close
Set Rs=nothing
Set Conn=nothing
Response.end
else
sql = "UPDATE employeeinformation set Password='"&NewPassword&"'"
Conn.execute sql
Conn.close
Response.write("用戶密碼已經更改<br>")
Response.write("用戶名:"&Username&" 新密碼:"&NewPassword)
end if
%>

4、製作ASP網頁可以通過像製作HTML網頁那樣用設計頁面所見即所得的方法設計嗎?

先用工具設計好html頁再往裡面添加asp語句即可。

5、構架一個asp網站,設計6個網頁構建的簡單網站

?

6、asp網頁設計中用戶登錄

<script language=javascript>
<!--
//驗證輸入
function CheckForm()
{
if(document.Login.uid.value=="")
{
alert("請輸入用戶名!");
document.Login.uid.focus();
return false;
}
if(document.Login.pwd.value == "")
{
alert("請輸入密碼!");
document.Login.pwd.focus();
return false;
}
if (document.Login.verifycode.value==""){
alert ("請輸入您的驗證碼!");
document.Login.verifycode.focus();
return(false);
}
}
-->
</script>
//表單
FORM name="Login" action="admin_check.asp" method="post" onSubmit="return CheckForm();">
<table width="682" height="170" border="0" align="center" cellpadding="0" cellspacing="0" background="images/backlogin.jpg"class="t_table">
<tr>
<th width="134" height="100" scope="col"> </th>
<th width="53" scope="col"> </th>
<th width="84" scope="col"> </th>
<th width="100" scope="col"> </th>
<th width="111" scope="col"> </th>
<th width="44" scope="col"> </th>
</tr>
<tr>
<td height="35"> </td>
<td><span class="STYLE3">管理員:</span></td>
<td colspan="2"><input name="uid" class="inputname" type="text" id="uid" style="border: 1px solid #999999;FONT-SIZE: 9pt; height:21;width:165" size="16"></td>
<td rowspan="3"> </td>
<td> </td>
</tr>
<tr>
<td height="35"> </td>
<td><span class="STYLE3">密  碼:</span></td>
<td colspan="2"><input name="pwd" class="inputpassword" type="password" id="pwd" style="border: 1px solid #999999;FONT-SIZE: 9pt; height:21;width:165" size="16"></td>
<td> </td>
</tr>
<tr>
<td height="35"> </td>
<td>驗證碼:</td>
<td><input name=verifycode type=text value="<%If GetCode=9999 Then Response.Write "9999"%>" maxlength=4 size=10 style="border: 1px solid #999999; FONT-SIZE: 9pt;"></td>
<td><img src=GetCode.asp></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="4" valign="middle">   
<input name="button" type="image" src="images/login.gif" width="74" height="39" border="0">       <a href="../index.asp"><img src="images/quxiao.gif" width="75" height="39" border="0"></a></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="4"> </td>
<td> </td>
</tr>
</table>
</FORM>
以上的放在同一個asp文件中
//admin_check.asp
<%response.Expires = 0%>
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
'防SQL注入
function errsql(strget)
strcheck=strget
dim nothis(16)
nothis(0) = "net user"
nothis(1) = "xp_cmdshell"
nothis(2) = "/add"
nothis(3) = "exec%20master.dbo.xp_cmdshell"
nothis(4) = "net localgroup administrators"
nothis(5) = "select"
nothis(6) = "count"
nothis(7) = "asc"
nothis(8) = "char"
nothis(9) = "mid"
nothis(10) = "'"
nothis(11) = """"
nothis(12) = "insert"
nothis(13) = "delete"
nothis(14) = "drop"
nothis(15) = "truncate"
nothis(16) = "from"
for i=1 to ubound(nothis)
if instr(strget,nothis(i)) then
response.write "<script language=javascript>alert('輸入信息含有非法字元,請重新輸入!');history.go(-1);</script>"
response.End
end if
next
errsql = strcheck
end function
%>
<%
dim admin,password,webpassword
admin=errsql(trim(request("uid")))
webpassword=errsql(trim(request("pwd")))
password=md5(webpassword)
if cstr(session("getcode"))<>cstr(trim(request("verifycode"))) then
response.Write "<script LANGUAGE='javascript'>alert('請輸入正確的驗證碼!');history.go(-1);</script>"
response.end
end if

set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from master where name='"&admin&"' and password='"&password&"' " ,conn,1,1
if not(rs.bof or rs.eof) then
if password=rs("password") then
session("admin")=trim(rs("name"))
session.Timeout=20
rs.Close
set rs=nothing
response.Redirect "index.asp"
else
response.write "<script LANGUAGE='javascript'>alert('對不起,登陸失敗!');history.go(-1);</script>"

end if
else
response.write "<script LANGUAGE='javascript'>alert('用戶名或密碼錯誤!');history.go(-1);</script>"

end if
%>
上面的conn.asp是連接Access資料庫的,資料庫和資料庫的表,自己建立沒問題吧

7、設計一個ASP網頁,在網頁中實現網頁被訪問的流量統計

不是的,網站流量統計只需要在您所需要統計流量的頁面文件中添加相應代碼即可,這需要使用FTP工具將您的網頁文件下載到本地,一般是主頁文件(名稱為index.html,index.htm,index.asp或者index.php),而代碼通常是添加到整個頁面文件的最底部。添加方法:用dreamweaver或者front page將網頁文件打開,進入到代碼模式,然後將統計代碼添加到整個網頁代碼的最底部。
我一直在使用的流量統計是gostats.cn的免費版本,感覺很強大,而且你的這些問題在他們的幫助頁面也有詳細的教程。

8、製作ASP動態網頁設計需要什麼軟體啊?

你只需要一個軟體就夠了,dreamweaver8或者dreamweaver cs3
隨便百度下就可以找到地方下載,或者告訴你:
http://ks.pconline.com.cn/download.jsp

9、設計一個ASP.NET網頁。

給文本框寫一個前端事件就可以了
我只給思路,沒有給直接給代碼的習慣。CSDN上也這樣,哪有這種拿來主義……

「該網頁用一個TextBox控制項輸入內容,當內容輸入完畢後,立即將輸入的內容顯示在標簽上,並將該內容添加到下拉列表框中」
知識點一:給textbox控制項onkeyup的前端事件,獲取其內容顯示在標簽上[這個不會也不會吧?]
知識點二添加到下拉列表框中的技術點為:下拉框.options.add(new Option(text,value));

"添加一個按鈕,當單擊該按鈕時,將下拉列表框中的每一項內容變成復選框列表中的一個選項"
知識點一:遍歷下拉框的項,提取所有項的文本和值
知識點二:創建復選框組
可使用document.createElement('input')的方式動態創建復選框,但為了效率,建議使用類似於模板拼接的方式,比如:_checkboxTemp = '<input type="checkbox" id="mybox{0}" name="mybox" value="{1}" /><label for="mybox{0}">{2}</label>';
然後將提取到的文本和值替換進來,生成一個字元串。最後使用:容器.innerHTML=生成的復選框組字元串的方式去生成;這樣通過減少對dom的操作使得效率更高

10、在ASP網頁設計中,查詢語句

sql="select * from " & xx & " where 年份='" & xx2 & "' and 院校='" & xx5 & "'"

與asp網頁綜合設計相關的知識