如何在asp页面修改access数据库?

来源:百度知道 编辑:UC知道 时间:2024/05/17 06:30:47
我想在页面上显示数据库内容并直接点击内容改变内容就可修改数据库的页面代码?先谢~~以下是我的显示数据库代码,不知道对各位老鸟回答我的问题有无作用,
<html>
<head>
<%
set conn=server.CreateObject("adodb.connection")
conn.provider="microsoft.jet.oledb.4.0"
conn.open server.MapPath("xinwen.mdb")
%>
<%
set bb=server.CreateObject("adodb.recordset")
bb.open"select * from 表1",conn,1,1
%>
</head>
<body>
已有留言内容如下<br>
<%
do until bb.EOF
response.write("id:"&bb("id"))
response.write("<br>主题:"&bb("bt"))
response.write("<br>内容:"&bb("nr"))
response.write("<hr>")
bb.movenext
loop
%>
<%bb.close
set conn=nothing%>
</body>
</html>
我想的要的就是asp部分,

关键地方给你写一下,代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language=javascript>
function ModifyInner(){
str='<form id="form1" name="form1" method="post" action=""><input name="textfield" type="text" value="点击我以修改我的内容" /><input type="submit" name="Submit" value="修改" /></form>';
window.Content.innerHTML=str;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<table width="200" border="0" cellspacing="1">
<tr>
<td id="Content" onclick="ModifyInner()">点击我以修改我