Author: Saim Khalid

  • Get Date Methods

    Get Date Methods JavaScript utilizes the Date object for date and time manipulation. This object offers an array of methods that facilitate retrieval and modification of date-specific information. Here, we will discuss about the get date methods within JavaScript which fetch different components of the date/time. Below is a table of the most commonly used…

  • Date Formats

    Date Formats JavaScript offers us a variety of date formats ranging from elementary locale-specific formatting all the way up to sophisticated customization options. Understanding the different date formats is a fundamental and essential aspect of web development, irrespective of whether youre building a dynamic web application, managing time sensitive data or simply displaying dates in a user-friendly…

  • Multiline Strings

    A multiline string is a JavaScript string that spans multiple lines. Using multiline strings in programs make it easier to read and maintain. In JavaScript, the easiest way to create multiline strings is to use template literals (template strings). The template literals are introduced in ECMAScript 2015 (ES6). Before introduction of template literals, the multiline strings are created by…

  • JSON

    What is JSON? JSON (JavaScript Object Notation) is a text-based data format used to represent objects and data structures. It is language-independent, meaning that it can be used with any programming language. JSON is often used to exchange data between a server and a web application, or between two different web applications. JSON Features JSON…

  • Browsers Compatibility

    It is important to understand the differences between different browsers in order to handle each in the way it is expected. So it is important to know which browser your web page is running in. To get information about the browser your webpage is currently running in, use the built-in navigator object. Navigator Properties There are several…

  • Image Map

    You can use JavaScript to create client-side image map. Client-side image maps are enabled by the usemap attribute for the <img /> tag and defined by special <map> and <area> extension tags. The image that is going to form the map is inserted into the page using the <img /> element as normal, except that it carries…

  • Multimedia

    The JavaScript navigator object includes a child object called plugins. This object is an array, with one entry for each plug-in installed on the browser. The navigator.plugins object is supported only by Netscape, Firefox, and Mozilla only. Example Here is an example that shows how to list down all the plug-on installed in your browser − <html><head><title>List of…

  • Animation

    You can use JavaScript to create a complex animation having, but not limited to, the following elements − You might be interested in existing JavaScript based animation library: Script.Aculo.us. This tutorial provides a basic understanding of how to use JavaScript to create an animation. JavaScript can be used to move a number of DOM elements (<img…

  • Form Validation

    Form validation normally used to occur at the server, after the client had entered all the necessary data and then pressed the Submit button. If the data entered by a client was incorrect or was simply missing, the server would have to send all the data back to the client and request that the form…

  • Page Printing

    Many times you would like to place a button on your webpage to print the content of that web page via an actual printer. JavaScript helps you to implement this functionality using the print function of window object. The JavaScript print function window.print() prints the current web page when executed. You can call this function directly using the onclick event as shown in…