关于删除的问题,请教
我想把查询出来的新闻删除掉,我写的这个,但是点删除的时候,他不理我。
...........................
<td><input type=submit name="shanchu" value="删除" onclick="shanchu()"></td>
</form>
<%xinwen.movenext
next
xinwen.close
set xinwen=nothing
%>
<%
set xinwen=server.createobject("adodb.recordset")
xinwen.open("select * from news order by id desc"),conn,1,1
function shanchu()
path=newstype&"/"&newspath&"/"&newsurl&".shtml"
set fso=server.CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.GetFile(path)
id=request.form("id")
if request.form("action")="onclick()" then
conn.execute(" delete from news where id like '"& id &"'")
MyFile.Delete
end if
end function
%>