var str = navigator.userAgent.toLowerCase() var ver = str.match(/cpu iphone os (.*?) like mac os/) if (!ver) { //非IOS系统 if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded', function() { FastClick.attach(document.body); }, false); } } else { if (parseInt(ver[1]) < 14) { if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded', function() { FastClick.attach(document.body); FastClick.prototype.focus = function (targetElement) { var length; if (targetElement.setSelectionRange && targetElement.type.indexOf('number') !== 0 && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month' && targetElement.type !== 'email') { length = targetElement.value.length; targetElement.focus(); targetElement.setSelectionRange(length, length); } else { targetElement.focus(); } }; }, false); } } } if (!window.Promise) { document.write('