function updateUser(userId,userName) { var conn = new ActiveXObject("ADODB.Connection"); conn.Open("DBQ=F://abc.mdb;DRIVER={Microsoft Access Driver (*.mdb)};"); var rs = new ActiveXObject("ADODB.Recordset"); var sql="update Student set stuName='" userName "' where Id=" userId ""; conn.execute(sql); conn.close(); conn = null; alert("修正成功"); }