In JavaScript scripting language, the async and defer attributes have a great support. So, let’s see how these attributes works. So, first of all we need to know how script works without any attributes. At first, the HTML file is parsed until the script file comes. Then, parsing stops and fetches the file and script […]
Search: “javascript”
We found 189 results for your search.
Client side java Script can make your application more dynamic and active. Let’s see some performance tips that will make your JavaScript fly. Basically, the browser’s interpretation of a code can itself introduce inefficiencies. So, the performance of different constructs may varies from client to client. Below tips can make a best practices to optimize […]
“javascript:void(0)” or “#”, these are two type by which we can call a JavaScript code. But, what do you prefer to do most? These are for a building a link that has the sole purpose of running JavaScript code. But, in terms of functionality, page loading speed, validation purposes, etc. It may come to our […]
Using jsPDF library, you can download the div containing graphs, tables, contents as a PDF. This is a HTML5 client-side solution for generating PDFs. Simply include library in your <head>, generate your PDF using the many built-in functions, then create a button to trigger the download. <script type=”text/javascript” src=”http://cdnjs.cloudflare.com/ajax/libs/jspdf/0.9.0rc1/jspdf.min.js”></script> Create a object: var doc = […]
One of the very common thing which confuse you while writing JavaScript is knowing when to use “call” and when to use “apply”. Let’s look at following example: var person1 = {name: ‘John’, age: 52, size: ‘2X’}; var person2 = {name: ‘Jane’, age: 26, size: ‘5X’}; var sayHello = function(){ alert(‘Hello, ‘ + this.name); }; […]
The JavaScript onerror method is the first thing to handle error in JavaScript. This error event is called on the window object whenever any exception occurs on the page. There are three pieces of information to identify the exact error: Error message URL, in which file the error occurred The line number in the given […]
In JavaScript you can associate functions with objects. Here we will demonstrate how the constructor creates the object and assigns properties. Object is a standalone entity, with properties and type in JavaScript. JavaScript objects can have properties, that define their characteristics. Objects and properties: An object in JavaScript has properties associated with this. So, a […]
It is an open-source HTML5 client-side solution for generating PDF documents using JavaScript. Browser compatibility: IE6+*, Firefox 3+, Chrome, Safari 3+, Opera. source: http://jspdf.com/ DOWNLOAD
Have you created a Wix website but no one is visiting it? Maybe you tried to design a wonderful website using Wix but ended up with something you didn’t want. Many are struggling with Wix just like you. When you first look at DIY website builders, they seem to be relatively affordable and easy. You […]
I’ve used a handful of AI coding tools over the past year, and most either try too hard or end up being more distracting than helpful. Codeium surprised me — in a good way. It’s fast, unobtrusive, and genuinely helpful when I’m deep into code. I didn’t need to set up an account or configure […]