on
laravel
- Get link
- Other Apps
<!DOCTYPE html>
<html>
<head>
<title>Device Detection</title>
<body>
<label id="detect"></label>
<input type="button" value="detect Device" onclick="detect()">
<script>
function detect()
{
var detect = document.getElementById('detect');
if(navigator.userAgent.match(/Windows/i))
{
detect.innerHTML="It's Window";
//alert("It's windows");
}
else if(navigator.userAgent.match(/Android/i))
{
detect.innerHTML="It's Android";
}
//alert("It's work");
}
</script>
</body>
</head>
</html>
Comments
Post a Comment
If you any doubt of any topic then you can comment me.