1.头部引入:
<script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script>
2.书写js代码:
<script>
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body)
}, false)
}
if (!window.Promise) {
document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js" ' + '>' + '<' + '/' + 'script>')
}
</script>