ASP页面实现点击按钮弹出文本框并添加到数据库
<html><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"><title>信...
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>信息页面</title><link rel="stylesheet" type="text/css" href="../css/main.css"><style type="text/css"><!--.style1 { color: #FF0000; font-weight: bold; font-size: 14px;}.STYLE2 {font-size: 33px}--></style></head><body bgcolor="#333333" leftmargin="2" topmargin="2"><div align="center"><br> <hr><table width="100%" border="0" cellpadding="2" cellspacing="1" bordercolorlight="#000000" bordercolordark="#ffffff" bgcolor="#CBD3D6"><%'response.write sql dim mypage Set Rs=Server.createobject("adodb.recordset") Set mypage=new pageShow '创建对象 mypage.getconn=conn '得到数据库连接'response.write sql mypage.GetSQL=Sql mypage.pagesize=50 mypage.ListNum=50 Set Rs=mypage.GetRs() If mypage.isReady then%> <tr align="right" bgcolor="#FFFBEF"> <td height="20" colspan="18"><input name="atag" type="hidden" id="atag" value=""><% mypage.pageNav()'显示分页信息%></td> </tr> <tr align="center" bgcolor="#FFF8EC"> <td>ID</td> <td>用户名</td> <td>联系方式</td> <td>加入时间</td> <td>添加备注</td> </tr> <% For i=1 To mypage.pagesize If rs.eof Then Exit For id=rs("id") sg=rs("sg") if i mod 2 =0 then if sg="1" then bcolor="#FFCCFF" else bcolor="#DEF3F3" end if else if sg="1" then bcolor="#FFCCFF" else bcolor="#F0EFEE" end ifend if %> <tr align="center" bgcolor="<%=bcolor%>"> <td><%=Rs("id")%></td> <td><%=trim(rs("user"))%></td> <td><%=trim(rs("phone"))%></td> <td><%=trim(rs("datetime"))%></td> <td><label> <input type="submit" name="Submit2" value="添加"> </label></td> </tr> <tr align="center" bgcolor="<%=bcolor%>"> <td colspan="20"><div align="left">备注内容:<%=trim(rs("sc1"))%></div></td> </tr> <% rs.movenext Next %> <tr align="right"> <td height="20" colspan="20" bgcolor="#F0EFEE"><%mypage.pageNav()%></td> </tr><% Else response.Write("<tr align=right><td height=20>没有找到记录!</td></tr>") End If set rs=Nothing Set mypage=Nothing conn.close set conn=nothingFunction ReportFileStatus(FileName) '//功能:判断文件是否存在 '//形参:文件名 '//返回值:成功为1,失败为-1 Set fso = CreateObject("Scripting.FileSystemObject") Dim msg msg = -1 If (fso.FileExists(FileName)) Then msg = 1 Else msg = -1 End If set fso =nothing ReportFileStatus = msg End Function %></form></table></body></html>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询