<html>
<title>
How to find the browser name using JavaScript?
</title>
<script>
function find_browser()
{
var nAgt = navigator.userAgent;
if (nAgt.indexOf('Chrome') != -1) {
alert('Chrome');
}else if (nAgt.indexOf('Firefox') != -1) {
alert('Firefox');
}else if (nAgt.indexOf('Opera') != -1) {
alert('Opera');
}else if (nAgt.indexOf('MSIE') != -1) {
alert('Microsoft Internet Explorer');
}else if (nAgt.indexOf('Safari') != -1) {
alert('Safari');
}else if (nAgt.indexOf('Trident/') != -1) {
alert('Microsoft Internet Explorer (MSIE 11+)');
}else{
alert('Others');
}
}
</script>
<body onload="find_browser()">
<h1> Find the browser 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