网页留言代码(网页设计留言板代码)
admin 发布:2022-12-19 19:55 138
今天给各位分享网页留言代码的知识,其中也会对网页设计留言板代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:
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;istr.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); 以上代码就可以实现留言板输入和查看啦 希望能解决你的问题啊
网页留言板代码
link href="../../css/user.css" rel="stylesheet" type="text/css"
script language="JavaScript" src="../../js/common.js"/script
script language="JavaScript" src="../../js/ubbcode.js"/script
script language="JavaScript"
function formCheck()
{
if (document.theform.nickname.value == "")
{
alert("请填写名字。");
document.theform.nickname.focus();
return false;
}
if (document.theform.content.value == "")
{
alert("请填写留言内容。");
document.theform.content.focus();
return false;
}
theform.Submit.disabled=true;
return true;
}
function showimage()
{
document.images.faceimg.src=face_image[parseInt(document.theform.face.options[document.theform.face.selectedIndex].value)];
}
body background=""
center
IFRAME marginHeight=0 marginWidth=0 noResize scrolling=no frameBorder=0 src=";bgcolor=ffffff" width=468 height=60
/IFRAME
/center
p /p
form name="theform" onsubmit="return formCheck();" method="post" action="get_post.asp"
TABLE width=550 border=0 align="center" cellPadding=0 cellSpacing=0
table width="550" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#ebebeb"
tr
td class="pt9"
p*名字:
input name="nickname" type="text" size="15" maxlength="12" class="inputbox1"
br
Email:
input name="email" type="text" size="15" maxlength="45" class="inputbox1"
主页地址:
input name="hp_url" type="text" value="http://" size="22" maxlength="125" class="inputbox1"
/p
/td
tr
td width="409" class="pt9" !--因为图片连接的原因,本文件只适合include在script/dirname下的文件 --
img onClick=bold() src="../../images/icon_editor_bold.gif" width="23" height="22" alt="粗体" border="0"img onClick=italicize() src="../../images/icon_editor_italicize.gif" width="23" height="22" alt="斜体" border="0"img onClick=underline() src="../../images/icon_editor_underline.gif" width="23" height="22" alt="下划线" border="0"
img onClick=center() src="../../images/icon_editor_center.gif" width="23" height="22" alt="居中" border="0"img onClick=hyperlink() src="../../images/icon_editor_url.gif" width="23" height="22" alt="超级连接" border="0"img onClick=email() src="../../images/icon_editor_email.gif" width="23" height="22" alt="Email连接" border="0"img onClick=image() src="../../images/icon_editor_image.gif" width="23" height="22" alt="图片" border="0"img onClick=flash() src="../../images/icon_swf.gif" width="23" height="22" alt="Flash图片" border="0"img onClick=showcode() src="../../images/icon_editor_code.gif" width="23" height="22" alt="编号" border="0"img onClick=quote() src="../../images/icon_editor_quote.gif" width="23" height="22" alt="引用" border="0"img onClick=list() src="../../images/icon_editor_list.gif" width="23" height="22" alt="目录" border="0"
br
tr
td
table width="100%" border="0" cellpadding="0" cellspacing="0" class="pt9"
tr
td width="40" valign="top"*留言:/td
tdtextarea name="content" cols="50" rows="6" id="content"/textarea/td
/tr
/table
p align="center"
input name="replyer" type="hidden" value=""
input name="reply_content_id" type="hidden" value=""
input name="userid" type="hidden" value="79444"
input type="submit" name="Submit" value="确认留言" class="button1"
input type="reset" name="Reset" value="取消重写" class="button1"
/p/td
/tr
/table
p /p
/form
table width="550" border="0" align="center" cellpadding="2" cellspacing="1"
tr
td width="88" valign="top"
img src=""
/td
td width="417"TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 class="pt9"
TBODY
TR
TD width=43 colSpan=2 height=29 rowSpan=2IMG height=29
src="../../images/1_r2_c2.gif" width=43 border=0/TD
TD background=../../images/1_r2_c4.gif height=10/TD
TD width=37 colSpan=2 height=29 rowSpan=2IMG height=29
src="../../images/1_r2_c6.gif" width=37 border=0/TD
/TR
TR
TD height=19 TABLE cellSpacing=0 cellPadding=0 width="100%" border=0
TBODY
TR
TD class="pt9" font class="filtertxt"dsfsd/font /TD
TD width="168" align=right class="pt9" /TD
/TR
/TBODY
/TABLE/TD
/TR
TR
TD width=10 background=../../images/1_r4_c2.gif/TD
TD width=27/TD
TD width="100%" height=50 img src="../../images/blank.gif" width="5" height="5"
br fdsfsdbdfssdfsdf/b br img src="../../images/blank.gif" width="5" height="5" /TD
TD width=22/TD
TD width=15 background=../../images/1_r4_c2.gif/TD
/TR
TR
TD background=../../images/1_r4_c2.gif/TD
TD/TD
TD height=1hr width="100%" size="1" noshade/TD
TD/TD
TD background=../../images/1_r4_c2.gif/TD
/TR
TR
TD width=43 colSpan=2 height=26 rowSpan=2 IMG height=26 src="../../images/1_r6_c2.gif" width=43 border=0/TD
TD align=right height=17
img src="../../images/no_home.gif" align="absmiddle" img src="../../images/no_email.gif" align="absmiddle" FONT color=#336600[2006-7-17 21:24:00]/FONT /TD
TD width=43 colSpan=2 height=26 rowSpan=2IMG height=26
src="../../images/1_r6_c6.gif" width=37 border=0/TD
/TR
TR
TD background=../../images/1_r2_c4.gif
height=9/TD
/TR
/TBODY
/TABLE/td
/tr
/table
BR
form
table width="516" border="0" cellspacing="0" cellpadding="0" align="center"
tr
td
table width=100% border=0 cellspacing=1 cellpadding=2 class=pt9trtd height=13img src=../../images/turnpage2_1.gif align=absmiddle border=0 img src=../../images/turnpage2_2.gif align=absmiddle border=0 b1/b | img src=../../images/turnpage2_3.gif align=absmiddle border=0 img src=../../images/turnpage2_4.gif align=absmiddle border=0/tdtd class=pt9 width=140 align=right共font color=red1/font页第input type=text name=JumpPage maxlength=3 size=3页input type=button value=转页 onClick="location.href='/script/user/list.asp?userid=79444page=' + this.form.JumpPage.value;"/td/tr/table
/td
/tr
/table
/form
网页留言栏的代码
在HEAD里添加/script
%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString "") Then
MM_editAction = MM_editAction "?" Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%
%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "userinfo") Then
MM_editConnection = MM_conn_STRING
MM_editTable = "user"
MM_editRedirectUrl = "index005.asp"
MM_fieldsStr = "username|value|Usermail|value|Userqq|value|Address|value|Postcode|value|Usertel|value|url|value|zhuti|value|Communication|value"
MM_columnsStr = "Username|',none,''|Usermail|',none,''|Userqq|',none,''|Address|',none,''|Postcode|',none,''|Usertel|',none,''|url|',none,''|zhuti|',none,''|Communication|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl "" And Request.QueryString "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString "") Then
MM_editRedirectUrl = MM_editRedirectUrl "?" Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl "" Request.QueryString
End If
End If
End If
%
在BODY里添加
table width="534" border="0" align="center" cellpadding="0" cellspacing="0"
tr
td align="right"table width="100%" border="0" cellpadding="0" cellspacing="0" class="css1"
tr
tdtable width="96%" border="0" align="left" cellpadding="0" cellspacing="0"
tr
tdtable width="100%" height="152" border="0" align="center" cellpadding="0" cellspacing="0"
tr
td width="13%" height="19" align="right" class="STYLE2"用户名:/td
td width="35%"div align="left"
label
input name="username" type="text" id="username" value="游客" size="25" /
/label
/div/td
td width="15%" class="STYLE2"E-mail:/td
td width="37%"input name="useremail" type="text" class="input0" id="useremail" size="25" //td
/tr
tr
td height="19"div align="right" class="STYLE2"qq:/div/td
tddiv align="left"
label
input name="userqq" type="text" class="input0" id="userqq" size="25" /
/label
/div/td
tddiv class="STYLE2"个人主页:/div/td
tdinput name="url" type="text" class="input0" id="url" value="http://" size="25" //td
/tr
tr
td height="19"div align="right" class="STYLE2"主题:/div/td
td colspan="3"div align="left"
label
input name="zhuti" type="text" class="input0" id="zhuti" size="40" /
/label
/div/td
/tr
tr
td height="65" align="right"span class="STYLE2"内容:/span/td
td colspan="3"label /label
div align="left"
textarea name="Communication" cols="60" rows="4" class="input0" id="Communication"/textarea
/div/td
/tr
tr
td colspan="4" class="STYLE79"table width="200" border="0" align="center" cellpadding="0" cellspacing="0"
tr
tdlabel /label
div align="center"
input name="regSubmit" type="submit" class="css2" id="regSubmit" onClick="return check();" value="留言" /
/div/td
tdlabel /label
div align="center"
input name="Submit5" type="reset" class="css2" id="Submit5" value="重置" /
/div/td
/tr
/table/td
/tr
/table/td
/tr
/table
input type="hidden" name="MM_insert" value="userinfo" /
script language="JavaScript" type="text/javascript"
function check()
{
// if(document.userinfo.username.value=="")
// { document.userinfo.username.focus();
// alert("用户名不能为空!");
// return false;
// }
// if(document.userinfo.username.value.length 4)
// { document.userinfo.username.focus();
// alert("用户名的长度不小于4个字符!");
// return false;
// }
if(document.userinfo.useremail.value=="")
{ document.userinfo.useremail.focus();
alert("Email 不能为空!");
return false;
}
if(document.userinfo.useremail.value.charAt(0)=="."||
document.userinfo.useremail.value.charAt(0)=="@"||
document.userinfo.useremail.value.indexOf('@',0) == -1||
document.userinfo.useremail.value.indexOf('.',0) == -1||
document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
{
alert("Email地址格式不正确!");
document.userinfo.useremail.focus();
return false;
}
if(document.userinfo.Address.value=="")
{ document.userinfo.Address.focus();
alert("地址不能为空!");
return false;
}
if(document.userinfo.Postcode.value=="")
{ document.userinfo.Postcode.focus();
alert("邮编请认真填写!");
return false;
}
if(document.userinfo.Communication.value=="")
{
document.userinfo.Communication.focus();
alert("您需要的项目内容不为空!");
return false;
}
return true
}
/script
/td
/tr
/table
hr size="1" color="#101010" /
/td
/tr
/table
百度空间首页留言板代码
/******留言板******/
#mod_board.mod{} /*留言板模块*/
#mod_board table.modth{} /*以下6项如果不设定则继承通用模块的样式*/
#mod_board td.modtl{}
#mod_board div.modhead{}
#mod_board span.modtit{}
#mod_board td.modtc{}
#mod_board td.modtr{}
/*其它代码与最新评论区完全相同,可以用#mod_board罩着修改,但一定要放到评论区代码的后面才能生效*/
/******留言板内部页面******/
#spBCmtAuthor{} /*留言姓名输入框*/
#spBCmtURL{} /*留言网址输入框*/
#spBCmtText{} /*留言输入框*/
#vercode input{} /*验证码输入框*/
#in_send td.f14 input{} /*添加留言按钮*/
#in_msg {} /*留言区*/
#in_msg div.tit{} /*留言区标题*/
#in_msg a{} /*留言区链接*/
#in_msg a:hover{} /*悬停效果*/
#in_msg td.index{} /*留言序号*/
#in_msg div.user{} /*留言用户*/
#in_msg div.user a img{} /*用户头像*/
#in_msg div.user a:hover img{} /*悬停效果*/
#in_msg td.cnt{} /*留言时间*/
#in_msg div.desc{} /*留言内容*/
#in_msg div.line{} /*分界线*/
p.s. CSS初学者可以略过下面的内容,建议CSSer参考一下。
由于留言板内部页面与评论区域的代码交叉嵌套,因此在设计模板时应注意语句的先后顺序,下面给出评论区与留言区的建议语句排序:
/******内部发表评论区域******/
#in_send{} /*发表评论区域背景*/
#in_send input{} /*内部发表评论及留言区域的输入区,包括单选框、文本框和按钮*/
#in_send div.tit{} /*发表评论标题*/
#in_send table{} /*发表评论内容*/
#in_send td.f14{} /*提示语*/
input.#spBlogCmtor{} /*姓名输入框*/
input.#spBlogCmtURL{} /*网址输入框*/
#spBlogCmtText{} /*评论输入框*/
/******留言板内部页面******/
input.#spBCmtAuthor{} /*留言姓名输入框*/
input.#spBCmtURL{} /*留言网址输入框*/
#spBCmtText{} /*留言输入框*/
#vercode input{} /*验证码输入框*/
#in_send td.f14 input{} /*留言按钮*/
#in_msg{} /*留言区*/
#in_msg div.tit{} /*留言区标题*/
#in_msg a{} /*留言区链接*/
#in_msg a:hover{} /*悬停效果*/
#in_msg table.item{} /*留言列表*/
#in_msg td.index{} /*留言序号*/
#in_msg div.user{} /*留言用户*/
#in_msg div.user a img{} /*用户头像*/
#in_msg div.user a:hover img{} /*悬停效果*/
#in_msg td.cnt{} /*留言时间*/
#in_msg div.desc{} /*留言内容*/
#in_msg div.line{} /*分界线*/
其中部分代码与之前给出的代码略有出入(例如input.#spBCmtAuthor{}),这是因为相关的html代码为:
...
td class="f14"姓 名:/td
tdinput type="text" name="spBCmtAuthor" id="spBCmtAuthor" style="width:220px" onKeyDown="cont(this,50);" onKeyUp="cont(this,50);" maxlength="49"/td
...
因此,input.#spBCmtAuthor{}的写法比#spBCmtAuthor{}更为精确。 另外,#in_send input{} 可用来控制留言板“姓名”单选框的样式。但一定要把它提到最前,否则,会干扰姓名、网址等输入框的样式
默认的留言板代码如下:
#in_msg{width:710px}
#in_msg div.tit{margin-bottom:12px;color:#333333;font-size:14px;font-weight:bold}
#in_msg .item td.index{width:40px;font-weight:bold}
#in_msg .item div.user{width:150px;color:#333333;}
#in_msg .item div.user a{color:#3399CC;font-size:12px}
#in_msg .item div.user a:visited{color:#3399CC}
#in_msg .item div.user img{margin-bottom:5px}
#in_msg .item td.cnt a{color:#3399CC;font-size:12px}
#in_msg .item td.cnt a:visited{color:#3399CC}
#in_msg span.date{color:#666666;font-size:12px}
#in_msg div.desc{margin-top:5px;color:#333333;font-size:12px}
#in_msg div.line{margin-top:17px;line-height:17px;border-top:1px solid #D2E9F4}
网页留言板的代码
meta http-equiv="Content-Type" content="text/html;charset=gb2312"
%@ Language=VBScript %
!--#INCLUDE FILE="config.asp" --
!--#INCLUDE FILE="guest_lib.asp" --%
dim ASPBook
dim StrSQL
if not isempty(request("page")) then
Mypage=cint(Request("page"))
else
Mypage=1
end if
set ASPBook = Server.CreateObject("ADODB.Recordset")
StrSQL = "Select * from guest order by ID desc"
ASPBook.open StrSQL,conn,1,1
ASPBook.pagesize=Mypagesize
maxpages=cint(ASPBook.pagecount)
totalsize=cint(Mypagesize)
ASPBook.absolutepage=Mypage
GuestTotal=ASPBook.RecordCount
if cint(Mypage) 1 then
if cint(Mypage) maxpages then
MESSAGE("li没有你所想去的页数!/li")
Response.End
end if
end if
HEADER "显示留言"
MyMenu
%
html
head
title[ 客户留言系统 ]/title
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
link rel="stylesheet" href="css/colorbird.css"
style
BODY {SCROLLBAR-FACE-COLOR: #D4D0C8; SCROLLBAR-HIGHLIGHT-COLOR: #999999; SCROLLBAR-SHADOW-COLOR: #999999; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #E3E3E3; SCROLLBAR-DARKSHADOW-COLOR: #666666; }
/style
/head
body bgcolor="#FFFFFF" topmargin="0" leftmargin="0"
p align="center"a href="gb_sign.asp"
img border="0" src="IMAGES/sign.gif" alt="签写留言"/a/p
tdp align="center"font color="#000000"bfont face="Arial" size="1"Total of
font color="#ff0000"%=GuestTotal%/font messages, /font/b/font
font face="Arial"font size="1" color="#ff0000"%=MyPageSize%/fontfont size="1"
messages per page, You are on page/font/font/fontfont color="#FF0000"font size="1" face="Arial"%=cint(Mypage)%/font
%=Greeting%... font color="#000000"%PageLink%/font/p
/font
div align="right"/div/td
div align="center"
center
table width="590" border="0" cellspacing="0" cellpadding="0"
tr
td height="50"a href="gb_sign.asp"img src="IMAGES/shop.gif" alt="签写留言" width="89" height="25" border="0"/a/td
/tr
/table
table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#6699CC" width="590" height="197"
tr
td align="center" height="197"
table width="590" border="0" cellspacing="0" cellpadding="4" style="border-collapse: collapse" height="35" bgcolor="#F7F7F7"
tr
/tr
tr
/tr
/table
table cellspacing="1" border="1" width="592" height="23" style="border-collapse: collapse" cellpadding="0" bgcolor="#C6C3C6" bordercolorlight="#FFFFFF" bordercolordark="#000000" background="table.gif"
tr
td align="right" width="130" height="23"
p align="left"b
font color="#FFFFFF"留言者 :/font/b/p
/td
td align="right" width="445" height="23"
p align="left"b
font color="#FFFFFF"留言内容 :/font/b/p
/td
/tr
/table
table width="590" border="0" cellspacing="0" cellpadding="0"
%
If ASPBook.Eof or ASPBook.Bof then
Response.Write "TR"
Response.Write "TD bgcolor=" Color1 " align=center colspan=6FONT STYLE=font-size:9pt对不起,目前还没有任何留言,如要留言,请按“我要留言”图片!/FONT/TD"
else
i = 0
total = 0
do until ASPBook.Eof or total = totalsize
if i = 0 then
CColor = Color1
else
CColor = Color2
end if
%
tr bgcolor="%=CColor%"
td
table width="590" border="1" cellspacing="8" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111"
tr
/tr
/table
table width="590" border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" height="1"
tr
td width="137" rowspan="3" height="1" valign="top"
table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%" id="AutoNumber2" height="96"
tr
td width="100%" align="center" height="12"b%=ASPBook("名字")%/b/td
/tr
tr
td width="100%" align="center" height="54"%if ASPBook("性别") = "boy" then%
br
img src="images/boy.gif" alt="英俊潇洒的 %=ASPBook("名字")% 先生" align="middle" border="0"
%elseif ASPBook("性别") = "girl" then%
img src="images/girl.gif" alt="美丽又温柔的 %=ASPBook("名字")% 小姐" align="middle" border="0"
br
%end if%/td
/tr
tr
td width="100%" align="center" height="28"Form: %=ASPBook("来自")% /td
/tr
/table
/td
td width="234" height="1"font size="1"
font color="#000000" class="littel"
img src="./icons/em%=ASPBook("表情")%.gif" border="0" align="ABSCENTER"/fontfont color="#0000FF" class="littel"On:
%=ASPBook("留言日期")%/font/fontfont size="1" color="#0000FF"
/font/td
td width="212" height="1"%if ASPBook("邮件")"" then%
a href="mailto:%=ASPBook("邮件")%"
img src="images/email.gif" ALIGN="absmiddle" border="0" width="15" height="16"/a
%end if% %if ASPBook("主页")"" and ASPBook("主页")"http://" then%
a href="%=ASPBook("主页")%" Target="_blank"
img src="images/home.gif" ALIGN="absmiddle" border="0"/a
%end if% %if ASPBook("ICQ")"" then%
img src="images/icq.gif" alt="ICQ:%=ASPBook("ICQ")%" align="absmiddle" border="0" width="15" height="16"
%if ASPBook("OICQ")"" then% %end if%
a href=";%=ASPBook("OICQ")%" target="_blank"
img src="images/oicq.gif" alt="OICQ:%=ASPBook("OICQ")%" align="absmiddle" border="0" width="16" height="16"/a
%end if%
img src="images/ip.gif" alt="%=ASPBook("IP")%" align="absmiddle" border="0" width="13" height="16"
img src="images/system.gif" alt="%=ASPBook("系统")%" align="absmiddle" border="0" width="15" height="16"/td
/tr
tr
td width="450" height="14" colspan="2" valign="top"%=ASPBook("留言")% /td
/tr
tr
%if ASPBook("Reply")"" then%td width="450" height="17" colspan="2" valign="top"
font color="#FF0000"Reply :b /b/font
font color="#0000FF" class="littel" size="1"(%=ASPBook("Reply_Date")%)/fontbr
img src="./icons/em%=ASPBook("Reply_Icon")%.gif" border="0" align="ABSCENTER"%=ASPBook("Reply")%/font/td
%end if%/tr
/table
table width="590" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111"
tr
td width="137" rowspan="2" /td
td width="450"/td
/tr
tr
td width="450" /td
/tr
/table
table width="590" height="24" border="0" cellpadding="0" cellspacing="1" bordercolor="#DCE8F3" bordercolorlight="#FFFFFF" bgcolor="#DCE8F3" style="border-collapse: collapse"
tr
td align="right" width="131" height="20"
p align="left" /p
/td
td align="right" width="448" height="20"
a href="gb_reply.asp?page=%=mypage%Number=%=ASPBook("ID")%"
img src="images/quote.gif" alt="回复该留言" align="absmiddle" border="0" width="16" height="16"/a
a href="gb_delete.asp?page=%=mypage%Number=%=ASPBook("ID")%"
img src="images/recycle.gif" alt="删除该留言" align="absmiddle" border="0" width="16" height="16"/a/td
/tr
/table
/td
/tr
%
ASPBook.MoveNext
i = i + 1
if i = 2 then i = 0
total = total + 1
loop
% %END IF%
/table
%COPYRIGHT%
table border="0" cellpadding="2" cellspacing="0" width="590" height="1" bgcolor="#F7F7F7" style="border-collapse: collapse" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF"
tr
td width="131" height="1"
p align="center"/p
/td
td align="right" width="448" height="1"font color="#000000"%PageLink%
/font /td
/tr
/table
/td
/tr
/table
/center
/div
div align="center"
center
table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="592" id="AutoNumber1"
tr
td width="100%"
p align="center"a href="gb_sign.asp" /abr
/p
/td
/tr
/table
/center
/div
/body
/html
%
function PageLink
PageShowSize = 10
Scriptname=Request.Servervariables("script_name")
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((GuestTotal-1)/MyPageSize)+1
if Maxpages 1 then
if PageNextSize 1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "a href='" Scriptname "?page=" PagePrev "'[]/a-"
end if
if Mypage-1 0 then
Prev_Page = MyPage - 1
Response.write "a href='" Scriptname "?page=" Prev_Page "'[]/a "
end if
if maxpages=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
end if
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*10)-10
if PageLink cint(Mypage) then
Response.write "a href='" Scriptname "?page=" PageLink "'[" PageLink "]/a "
else
Response.Write PageLink " "
end if
next
if Mypage+1 =Pagetpage then
Next_Page = MyPage + 1
Response.write "a href='" Scriptname "?page=" Next_Page "'[]/a"
end if
if maxpages PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write "-a href='" Scriptname "?page=" PageNext "'[]/a"
end if
else
Response.write "[1]"
end if
END function
set ASPBook=nothing
conn.Close
set conn = nothing
%
求DW制作网页留言板的所有代码
!--#include file="../inc/conn.asp"--
%
dim name,qq,email,sex,liuyan,ly_type,ip,riqi
name=request("ly_user_name")
qq=request("ly_user_qq")
email=request("ly_user_email")
sex=request("ly_sex")
liuyan=request("ly_liuyan")
ly_type=request("ly_type")
ip=request.ServerVariables("REMOTE_ADDR")
if name="" then
response.write "script language=javascriptalert('您的名字没有填写,请填写完整信息,谢谢!');history.go(-1);/script"
elseif qq="" then
response.write "script language=javascriptalert('忘了QQ哦');history.go(-1);/script"
elseif liuyan="" then
response.write "script language=javascriptalert('留言内容不能为空!');history.go(-1);/script"
else
if ly_type="" then
ly_type=1
else
ly_type=2
end if
dim sql
sql="insert into liuyan(ly_user_name,ly_user_qq,ly_user_email,ly_sex,ly_liuyan,ly_type,ly_user_ip,ly_user_riqi) values('" name "','" qq "','" email "','" sex "','" liuyan "','" ly_type "','" ip "',#" date() "#)"
db.execute(sql)
response.redirect "ly_main.asp"
end if
%
关于网页留言代码和网页设计留言板代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;
相关推荐
- 04-29文字特效js代码(文字效果代码)[20240429更新]
- 04-29phpqq代码(免费代码)[20240429更新]
- 04-29css广告代码生成器(广告设计生成器)[20240429更新]
- 04-29简单的菜单点击改变图片代码(点击编辑图片改变)[20240429更新]
- 04-29discuz代码注入(discuz代码使用教程)[20240429更新]
- 04-29在线网页源代码(在线网页源代码查看器)[20240429更新]
- 04-29连连看c代码(连连看的代码)[20240429更新]
- 04-29网页图片闪烁js代码(css实现图片闪烁动画)[20240429更新]
- 04-29数据结构代码(数据结构代码题怎么写)[20240429更新]
- 04-29vb程序设计代码(vb程序设计代码题怎么做)[20240429更新]
取消回复欢迎 你 发表评论:
- 标签列表
- 最近发表
- 友情链接