web留言板課程設計
⑴ ASP.NET課程設計「留言板」代碼
網上漫天是
下一個,花點時間看看源碼
應該差不多
⑵ 設計一個簡單的基於Web的留言板
我手機連我自己家的無線網然後突然斷開了,之後在怎麼連就連不上了,信號滿格。
⑶ 誰能給我一個WEB程序設計的簡單留言板
sdmessage.asp文件是留言板的留言頁面,也是留言的顯示頁面,其代碼如下:
<%
if not request.form("message")=""then
Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set Ts= Fs.OpenTextFile(""&server.mappath("sdmessage.txt")&"",8)
Ts.WriteLine(request.form("message"))
end if
%>
<html><head><title>盛達公司留言板</title></head>
<body>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="300">
<tr>
<td width="100%" height="30">
<p align="center">江西盛達公司留言板</td>
</tr>
<tr>
<td width="100%">
<form method="POST" action="">
<p align="center">
<textarea rows="4" name="message" cols="40"></textarea></p>
<p align="center"><input type="submit" value="提交"></p>
</form>
</td>
</tr>
<tr>
<td width="100%">留言:
</td>
</tr>
<tr>
<td width="100%">
<%
Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set Ts= Fs.OpenTextFile(""&server.mappath("sdmessage.txt")&"")
Do While Not Ts.AtEndOfStream
Response.Write Ts.ReadLine & "<br>" ' 逐行讀取,直到文件結尾
Loop
%>
</td></tr></table>
</center></div>
</body></html>
說明:
▲ if not request.form("message")=""then
用於驗證用戶輸入留言不為空。不過,一些驗證信息最好設計在客戶端進行,即當客戶端向伺服器提交表單信息時,先驗證表單信息是否符合要求,如果符合則提交,如果不符合,則給出提示信息,這樣做可以在一定程度上減輕伺服器的負擔。客戶端驗證可以是JavaScript或VBScript腳本,VBScript腳本參見前面VBScript章節的相關範例。下面是用JavaScript腳本進行輸入驗證,在頁面中所需要插入JavaScript腳本如下。
<script language="JavaScript">
<!--
function check_null(){
if (document.form1.message.value==""){
alert("請輸入留言!");
return false;
}
return true;
}
// -->
</script>
同時,表單標識符<form>的屬性代碼要改為:<form method="POST" action="" name="form1" onsubmit="javascript: return check_null()">,表示用戶單擊表單遞交按鈕後,先進行客戶端表單輸入驗證,如果驗證合格,則將表單內容發送到伺服器由相關頁面進行處理。
⑷ JSP課程設計 留言板(MVC模式)
搜源碼之家
裡面有的
⑸ web編程 留言板代碼實現留言板輸入和查看…
其實這個挺簡單的,代碼如下留言板輸入代碼,在form表單中插入: <textarea name="liuyan" rows="4" cols="60" ></textarea>查看留言的代碼://下面方法trans的作用是將string中的回車符號換位<br> 下面有兩種方法<%!string trans(String str){str=str.replace("\n", "<br>");return str;}%>或者<%!StringBuffer trans(StringBuffer str){for(int i=0;i<str.length();i++){if(str.substring(i,i+1).equal("\n")){str.delete(i,i+1);str.insert(i,"<br>");}}return str;}%> String str=request.getParameter("liuyan");//獲取form表單提交的留言 str=trans(str);// 調用第一個方法 StringBuffer str=new StringBuffer(str); str=trans(str);//調用第二種方法 out.println(" 你的留言是<br>"+str); 以上代碼就可以實現留言板輸入和查看啦 希望能解決你的問題啊
⑹ 求:基於Web的留言板的設計與實現(論文)
我有基於Web的留言板的設計與實現(論文)
⑺ 求一個web課程設計,完整的代碼運用ds、c#;運行環境vs2005; 關於留言板。只有前台處理就可以;只留言,
溫飛文俄方
⑻ 求一個web設計,asp留言板源代碼!!!!
我用DW做了一個簡單留言本,不是手寫的,你看看需不需要:
http://hi..com/渺孤鴻/blog/item/997917464c45803386947333.html
⑼ 用Java web 做一個留言板 留言功能實現了,不知道怎麼實現回復和刪除留言的功能,知道的高手,請幫幫忙。
留言表
留言id ……
回復表
回復id 留言id 回復人 回復內容 回復時間 等等根據需要自版己定
刪留言delete 留言表權 where 留言id
delete 回復表 where 留言id
刪回復就delete 回復表 where 回復id
<script>
function delete(a){
document.getElementById("liuyan").value=a;
提交
在servlet里
留言id = request.getParameter("liuyan")
}
</script>
<input type="hidden" name="liuyan" id="liuyan" />
for{
<a fref="#" onclick="delete(留言id)">刪除</a>
}
⑽ WEB程序設計請開發一個簡單的留言板程序,可以查看、添加和刪除留言。
發好了哦。。。。 <html> <head> <title>試驗四</title> </head> <body> <center><h2>我的留言板</h2> <table width="800" border="0" cellspacing="0" cellpadding="0" bgcolor="#0066FF"> <tr> <td>主題:</td> <td><input type="text" size="80" name="name" /></td> </tr> <tr> <td>內容:</td> <td><textarea cols="80" rows="8" name="content"></textarea></td> </tr> <tr> <td>姓名:</td> <td><input type="text" size="20" name="author" /></td> </tr> <tr> <td>Email:</td> <td><input type="text" size="50" name="email" /></td> </tr> <tr> <td></td> <td><input type="submit" value=" 提交 "/></td> </tr> </table> <% Response.Buffer = True ' 打開頁面緩沖 On Error Resume Next ' 打開錯誤處理 dim conn dim connstr connstr="DBQ="+server.mappath("note.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" set conn=server.createobject("ADODB.CONNECTION") conn.open connstr If Err.Number <> 0 Then Err.Clear Set conn = Nothing response.Write "錯誤了..." ' 錯誤處理 Response.Clear ' 清除緩沖區 Response.End End If action=request.QueryString("action") select case action case "del" '刪除留言 id=cint(request.QueryString("id")) conn.execute "delete from notebook where id="&id if err.number=0 then response.Write "<script>alert('刪除成功!');this.location='index.asp'</script>" else response.Write "<script>alert('刪除失敗!');this.location='index.asp'</script>" end if case "add" '添加留言 content_name=trim(request.Form("name")) content_author=trim(request.Form("author")) content=trim(request.Form("content")) email=trim(request.Form("email")) conn.execute "insert into notebook(content_name,content_author,content,email,content_time) "&_ "values ('"&content_name&"','"&content_author&"','"&content&"','"&email&"',#"&now()&"#)" if err.number=0 then response.Write "<script>alert('添加成功!');this.location='index.asp'</script>" else response.Write "<script>alert('添加失敗!');this.location='index.asp'</script>" end if end select '顯示留言 set rs=conn("select content_name,content,content_author,content_time,id from notebook") if rs.eof and rs.bof then response.Write "<hr width='800' />暫時沒有留言!" else do while not rs.eof %> <hr width="800" /> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100">主題:</td> <td><%=rs(0)%></td> </tr> <tr> <td>內容:</td> <td><%=rs(1)%></td> </tr> <tr> <td>留言人:</td> <td><%=rs(2)%></td> </tr> <tr> <td>時間:</td> <td><%=rs(3)%></td> </tr> <tr> <td></td> <td><a href="index.asp?action=del&id="<%=rs(4)%> target="_self">刪除</a></td> </tr> </table> <% rs.movenext loop end if rs.close set rs=nothing conn.close set conn=nothing %> </center> </body> </html>