我测试db操作没问题
// ==UserScript==
// @name New Userscript
// @namespace https://bbs.tampermonkey.net.cn/
// @version 0.1.0
// @description try to take over the world!
// @author You
// @match https://bbs.tampermonkey.net.cn/thread-4142-1-1.html
// ==/UserScript==
(function () {
'use strict';
// Your code here...
const db = openDatabase('mydb1', '1.0', 'Test', 2 * 1024 * 1024);
// 创建表
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS 高压订单表 (id integer primary key AutoIncrement,原订单号,订单编号,备注,退货,价格)')
//tx.executeSql('INSERT INTO 高压订单表 (原订单号,订单编号,备注,退货) VALUES ("3006153649820202437","20221105183654","扣子有问题","")')
//tx.executeSql('UPDATE 高压订单表 SET 订单编号="20221105183654" WHERE 备注="领子脏了"')
});
console.log('db ok');
})();