<!--#include file="../ajaxed.asp"--><%set p=new ajaxedPage 'db.open(AJAXED_CONNSTRING) p.DBConnection=true p.draw() sub init():end sub sub callback(action) if action = "do" then p.return(db.getRecordset("Insert Into [tt](Title,Content)values('"& p.RF("tle") & "','" & p.RF("cent") & "')")) end ifend sub sub main()%> <script> function done() { $("showinfo").innerHTML="Successfully inserted!"; } </script> <form id="frm"> <div id="showinfo"></div> <span><input type="text" id="tle" name="tle" /></span><br /><br /> <span><input type="text" id="cent" name="cent" /></span><br /><br /> <span><button onClick="ajaxed.callback('do',done)" type="button">submit</button></span> </form> <%db.close()%><%end sub%>

评论