<html>
<title>
How to find the Operating sysetm(OS) name using JavaScript?
</title>
<script>
function find_browser()
{
var nAgt = window.navigator.userAgent;
if (nAgt.indexOf('Mac') != -1) {
alert('Mac OS');
}else if (nAgt.indexOf('Linux') != -1) {
alert('Linux');
}else if (nAgt.indexOf('X11') != -1) {
alert('Unix');
}else if (nAgt.indexOf('Windows NT 6.2') != -1) {
alert('Windows 8');
}else if (nAgt.indexOf('Safari') != -1) {
alert('Windows 7');
}else if (nAgt.indexOf('Windows NT 6.0') != -1) {
alert('Windows Vista');
}else if (nAgt.indexOf('Windows NT 5.1') != -1) {
alert('Windows XP');
}else if (nAgt.indexOf('Windows NT 5.0') != -1) {
alert('Windows 2000');
}
}
</script>
<body onload="find_browser()">
<h1> Find the Operating sysetm(OS) name using JavaScript? </h1>
</body>
</html>
In this tutorial I have explain about the get YouTube thumbnail using AngularJS <html ng-app id="YoutubeApp"> <head> <title> How to get a YouTube video thumbnail dynamically from the YouTube API using AngularJS Tutorials</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script> <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script> function YoutubeController ($scope) { $scope.todos = []; $scope. addVideo = function() { $scope.todos.push({text:$scope.todoText, done:false}); $scope.todoText = ''; ...
Comments
Post a Comment