logo
  • 教程列表
  • SO官方文档
  • 电池状态 API
    • 电池事件
    • 获得当前的电池电量
    • 电池充电
    • 留出时间,直到电池耗尽
    • 留出时间,直到电池充满电
  1. StackOverflow 文档
  2. JavaScript 教程
  3. 电池状态 API
  4. 留出时间,直到电池充满电

留出时间,直到电池充满电

Created: November-22, 2018

// Get the battery API
navigator.getBattery().then(function(battery) {
    console.log( "Battery will get fully charged in ", battery.chargingTime, " seconds" );
});
  • 留出时间,直到电池耗尽

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明