var name=document.getElementById("user").value;
var pass=document.getElementById("pass").value;
var now= new Date();
var year=now.getYear();
var month=now.getMonth()+1;
var day=now.getDate();
var hour=now.getHours();
var minute=now.getMinutes();
var second=now.getSeconds();
var Logintime=(year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second);
var email=document.getElementById("email").value;
var filepath=location.href.substring(0, location.href.indexOf("user.html"))+"user.mdb";
path = filepath.substring(8);
con=new ActiveXObject("ADODB.Connection");
try{
con.Provider = "Microsoft.Jet.OLEDB.4.0";
con.ConnectionString = "Data Source=" +path;// "e:\user.mdb";
con.open;
}catch(e){alert("连接出错");}
alert("(\'"+name+"\',\'"+pass+"\',"+email+"\')");
try{
var sql="insert into [users](name,pass,email) values(\'"+name+"\',\'"+pass+"\',\'"+email+"\')";
con.execute(sql);
}catch(e){alert("插入数据出错"+e.tostring);}
con.close;
运行后提示插入数据提示undefined