mpt()});function addToDesktop(){if(dfdPrompt){dfdPrompt.prompt();dfdPrompt.userChoice.then(function(choiceResult){console.log(choiceResult.outcome);closePrompt();dfdPrompt=null})}else{console.log('添加到主屏幕的功能不可用。')}}window.onload=showInstallPrompt;