环境/设备/终端判断

点击回车键提交输入框内容

微信环境

1
console.log((/MicroMessenger/i).test(window.navigator.userAgent))

IOS环境

1
console.log((/(iPhone|iPod|iPad);?/i).test(window.navigator.userAgent))

android环境

1
console.log((/android/i).test(window.navigator.userAgent))