Detect windows phone

Detect windows phone with javascript

by Aamir Shahzad

JavaScript

if(navigator.userAgent.match(/iemobile/i))
{
    alert('test');
}