⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.asp

📁 是个不错的文件代码,希望大家好好用,
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect "index.asp"
end if

if request.form("question")<>"" then
sql="select * from data"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew

rs("question")=HtmlEncode(request.form("question"))
rs("key")=HtmlEncode(request.form("key"))

rs.update
response.redirect "ok.asp"
end if
%>

<html>
<head>
<style type="text/css">
<!-- 
td           { font-size: 12px; line-height: 17px }
body         { font-size: 12px; line-height: 17px }
p            { margin-top: 1; margin-bottom: 1 }
a:link       { text-decoration: none; color: black }
a:visited    { text-decoration: none; color: black }
a:active     { text-decoration: none }
a:hover      { text-decoration: underline; color: red }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>添加智力题目</title>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{   
    if (document.postart.question.value.length<1)
	{
        alert("请填写智力题目!");
        document.postart.question.focus();
        return false;
    }
    if (document.postart.key.value.length<1)
	{
        alert("请填写答案!");
        document.postart.key.focus();
        return false;
    }
}
//-->
</SCRIPT>
</head>

<body background="images/bg.gif">
 <div align="center">
  <center>
  <table border="0" width="100%" cellspacing="0" cellpadding="0" height="99">
    <form action="" method="post" name="postart" onsubmit="return checkadd()">
    <tr>
      <td width="100%" colspan="2" height="19"></td>
    </tr>
    <tr>
      <td width="35%" align="right" height="26">题目:</td>
      <td width="65%" height="26"><input type="text" name="question" size="40" maxlength="100" style="border: 1 solid #000000"> 
        <font color="#FF0000">100字以内</font></td>  
    </tr>  
    <tr>  
      <td width="35%" align="right" height="24">答案:</td>  
      <td width="65%" height="24"><input type="text" name="key" size="30" maxlength="50" style="border: 1 solid #000000">   
        <font color="#FF0000">50字以内</font></td>  
    </tr>  
    <tr>  
      <td width="100%" align="right" colspan="2" height="30">  
        <p align="center"><input type="submit" value="提交" name="submit">&nbsp;   
        <input type="reset" value="取消" name="reset">&nbsp; <input type="button" value="返回" name="back" onclick="window.location.href='index.asp';"></td>      
    </tr>      
    </form>      
  </table>      
  </center>      
</div>                                   
</body>                                      
                                      
</html>                                      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -