function quick_exchange(code) { var is_mobile = 'no'; var is_iphone = 'no'; var is_weixin = 'no'; var browsers = 'Chrome'; var os_name = 'unkonw'; var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); var isUc =navigator.userAgent.indexOf('UCBrowser') > -1; if(is_mobile == 'yes'){ if( is_iphone == 'yes' && (browsers == 'Safari' || is_weixin == 'yes'||os_name=='ios') && !isUc ){ location.href = "sms:10086&body="+code; }else{ location.href = "sms:10086?body="+code; } } }