To detect browser in JavaScript, window.navigator object contains information about the user’s browser i.e. Firefox, Internet Explorer, Opera, etc. JavaScript has a standard object called navigator which contains data about user’s browser. It has a lot of properties. JavaScript window.navigator object can be written without window prefix. For example, navigator.appName navigator.appCodeName navigator.platform Browser detection is […]
Search: “javascript”
We found 189 results for your search.
JavaScript Objects Overview
JavaScript is an Object Oriented Programming i.e. OOP language. It provides four basic capabilities i.e. Encapsulation, Aggregation, Inheritance and Polymorphism. For example as a car. It has properties like weight and color and and methods like start and stop. So, all cars have same properties, but the values differ from one car to another. Object […]
Embedding PDFs without JavaScript
Without JavaScript, a PDF can be embedded into HTML pages. Embedding PDFs without JavaScript is a major part in HTML. In below there are 4 examples that describes how to use this common techniques. For embedding a PDF file into a HTML document, this is an open-source standards-friendly JavaScript utility. We need to know that […]
JavaScript Browsers Handling
In this tutorial, you can get knowledge of JavaScript Browsers Handling or Compatibility and how to handle JavaScript in different browsers. Before applying JavaScript, we need to know the differences between different browsers and how they can be handled in different way. You can use built-in navigator object to get the information about the browser […]
Enabling JavaScript in Browsers
Most of the modern browsers come with built-in JavaScript support and Enabling JavaScript makes you fully support in it. This tutorial contains the procedure of enabling and disabling JavaScript for supporting in your current browsers i.e. Internet Explorer, Firefox, Opera, chrome etc. Enable JavaScript in Firefox Follow this steps to enable/disable JavaScript in Firefox: Open […]
JavaScript Strict mode
JavaScript Strict mode is a way to opt into a restricted variant which is an literal expression i.e. ignored by earlier versions of JavaScript. This is not just a subset but intentionally it has several semantics from normal code. Both strict mode and non-strict mode code can coexist, so incrementally, scripts can opt into strict […]
Deal with JavaScript and Cookies
JavaScript cookie is the most efficient method of tracking and remembering preferences, lets you store user information in small text files on computer. By definition, a cookie is a nothing but a piece of data that is sent from a website and stored locally by the user’s browser. Basically, web browsers and servers use HTTP […]
Are you aware of printing the content of a web page via an actual printer using JavaScript? Don’t get confuse! JavaScript can help you to implement print functionality using a print function of window object. This works on all modern browsers, so this can be a valid substitute inside a browser where toolbar is disabled. […]
Placement of JavaScript in HTML
For including JavaScript code in a HTML document, there is always a flexibility to put in head or body section. A JavaScript function is nothing but a block of JavaScript code which can be executed when required. In HTML, we need to insert JavaScript code between the <script>…</script> tags. Most of the time we include […]
JavaScript client side scripting provides many advantages over server side scripts. For example, using JavaScript, you can check if any user has entered a correct email address in a form field. JavaScript is one of the most simple, lightweight, versatile and interpreted programming language used to extend functionality in websites. It also possesses some negative […]