JS获取终端类型

var g_sUA = navigator.userAgent.toLowerCase();
var android = g_sUA.match(/(android)\s+([\d.]+)/);
var ios = g_sUA.match(/(ipad|iphone|ipod).*os\s([\d_]+)/);
var isAndroid = !!android;
var isIos = !!ios;

Access事务执行多个sql语句

dim cn as string
   Dim cnConn As ADODB.Connection
   Set cnConn = New ADODB.Connection
    Dim mysql
    On Error GoTo err1

cn=""
'连接字符串自己写
   cnConn.Open CN
   cnConn.BeginTrans '开始一个事务
   
   For Each mysql In sql
        cnConn.Execute mysql
   Next
   cnConn.CommitTrans '提交一个事物
   
   Set cnConn = Nothing
   Exsql = True
   Exit Function
err1:
    cnConn.RollbackTrans '回滚一个事物
    Exsql = False
End Function