var system={useragent:navigator.useragent.tolowercase (), name:function () {var bisipad = This.userAgent.match (/I pad/i) = = "ipad"; var Bisiphoneos = This.userAgent.match (/iphone os/i) = = "iphone OS"; var BISMIDP = This.userAgent.match (/midp/i) = = "MIDP"; var bIsUc7 = This.userAgent.match (/rv:1.2.3.4/i) = = "rv:1.2.3.4"; var bisuc = This.userAgent.match (/ucweb/i) = = "UCWeb"; var bisandroid = This.userAgent.match (/android/i) = = "Android"; var bisce = This.userAgent.match (/windows ce/i) = = "Windows CE"; var biswm = This.userAgent.match (/windows mobile/i) = = "Windows Mobile"; var bisplaybook = This.userAgent.match (/playbook/i) = = "Playbook"; var bisblackberry = This.userAgent.match (/bb10/i) = = "BB10"; if (Bisipad | | bisiphoneos | | bismidp | | bIsUc7 | | bisuc | | bisandroid | | bisce | | biswm| | bisplaybook| | bisblackberry) { return "Phone"; } else { return "PC"; } } };
Determine whether the current device is a mobile device or a PC