How to tell if the Windows is a PC or a tablet?

such as the title: now many tablets also use Windows10,. I want to check whether users are using tablets or PC computers, and ask for advice on PHP, Node and JS.

Apr.03,2021

JS: navigator.userAgent
you press F12 to enter navigator.userAgent directly in the console. My computer will display a string with Windows, and a mobile phone will display a string with Android.
my two pictures here are all the information of navigator.

     let list = [];
    for (let o in navigator) {
        list.push(<div>{o + '=' + navigator[o]}</div>);
    }

    return (
        <div>{list}</div>
    );

the simplest way is to judge


if ((navigator.userAgent.match (/ (phone | pad | pod | iPhone | iPod | ios | iPad | Android | Mobile | IEMobile | MQQBrowser | JUC | Fennec | wOSBrowser | BrowserNG | WebOS | Symbian | Windows Phone) / I) {
alert ('mobile end')
} else {
alert ('PC side')
}


Useragent analysis tool. Browser Analysis and judgment tool-user Agent, operating system Information

Code address: https://github.com/mumuy/browser

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e638fa-45a2c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e638fa-45a2c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?