<%
u_name=Request.Form("Name") u_company=Request.Form("Company") u_relation=Request.Form("Relation") u_url=Request.Form("Url") u_msg=Request.Form("Msg") Set conn=Server.CreateObject("ADODB.Connection") conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("Msg.mdb") sql="Insert into data (Name,Company,Relation,Url,Msg) values (’"&U_name&"’,’"&u_company&"’,’"&u_relation&"’,’"&u_url&"’,’"&u_msg&"’)" conn.Execute(sql) conn.close Set conn=Nothing Response.Write "&temp=ok" %> |
System.useCodepage = true;
Name = ""; Company = ""; Relation = ""; Url = ""; Msg = ""; function SendData() { if (Name != "" && Company != "" && Relation != "" && Msg != "") { var MyVar = new LoadVars(); MyVar.Name = Name; MyVar.Company = Company; MyVar.Relation = Relation; MyVar.Url = Url; MyVar.Msg = Msg; MyVar.sendAndLoad("http://localhost/6/save.asp", MyVar, "POST"); temp = "提交中,請稍侯..."; MyVar.onLoad = function(success) { if (success) { temp = "呵呵!成功咯哟!來!再來一條..."; Name = ""; Company = ""; Relation = ""; Url = ""; Msg = ""; } else { temp = "失敗了!可能網絡有問題!"; } }; } else { temp = "請輸入完整!"; } } sendBTU.onRelease = function() { SendData(); }; clearBTU.onRelease = function() { temp = "歡迎你給我發留言!"; Name = ""; Company = ""; Relation = ""; Url = ""; Msg = ""; }; stop(); |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |