Attributes provide information about html elements.They are specified as name value pairs in the opening tag of the html element. <element attribute=”value”/> e.g <input type=”text”/> When a web page is rendered the attribute values are read and the page is rendered accordingly.So to update a web page dynamically attributes are important. For example when a […]
jQuery
Dynamically creating elements in jQuery
$() and jQuery() functions are mainly used for selecting the html elements on a web page.But they have another important use as well .$() and jQuery() can be used for creating html elements dynamically. To create an html element dynamically we pass the html for the element to this function.For example to create and add a span […]
jQuery each function for looping over array elements
A common requirement when working with arrays is to loop over the array elements. $.each() is a useful method for iterating over the array elements.We can also specify the action to perform for each element using a function.We pass this function as an argument to the $.each(). To process all the elements in an array […]
JSON parse and stringify methods
JSON is an object which contains methods for converting between JSON and their string representation.We can not create an object of JSON ,instead we call the methods directly.The two main methods it contains are parse and stringify. It is important to validate if a browser supports the JSON object as it might not be supported by very […]
Introduction to JSON
JSON stands for JavaScript Object Notation.JSON is used for storing and exchanging data.It is important to understand that it is a subset of the javascript language. It defines a set of rules for structuring the data.This means that it specifies how a certain piece of data should be structured. JSON is a Data interchange Format […]