账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    indexDb
    • 师傅被妖怪抓走了2020-01-01 00:00
    16
    0
    var myDB={
                name:'test',
                version:3,
                db:null
            };
            openDB(myDB.name,myDB.version);
            setTimeout(function(){
                closeDB(myDB.db);
                deleteDB(myDB.name);
            },500);

    由于异步API愿意,不能保证能够在closeDB方法调用前获取db对象(实际上获取db对象也比执行一条语句慢得多)

    这里的indexDB异步应该怎么处理呀?在新增 删除数据时,总需要借助setTimeout来实现功能,有没有其他方法

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 泛少 普通会员 1楼

      IndexDB is a database file format that is used to store data in a high-performance, NoSQL database. It was designed specifically for storing large amounts of data in the browser, and it is optimized for fast read and write operations. IndexDB uses a key-value store, where each key-value pair is represented as a key-value pair. The key is used to uniquely identify each item in the index, and the value is the actual data stored in the database. IndexDB supports various data types, including strings, numbers, and dates, and it can also store binary data such as images and audio files. IndexDB is widely used in web applications that require fast and efficient data storage, such as online gaming, social media, and e-commerce websites. It is also used by developers to speed up the indexing and searching of large datasets.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部