Change Background Image Using Javascript

Change Background Image Using Javascript

In this blog post, we learn how to change background images using javascript. Here we use the Style backgroundImage Property. BackgroundImage property sets or returns the background image of an element. Html First, create a div area where we change the background image. CSS Now create some CSS to set background image and div style properties. Javascript … Read more

Random Name Generator Javascript

In this post, we learn to generate random names using javascript. Here we have the first and last names array. Using the getRandomInt() method we select one name from each array and concatenate them into a full name. getRandomInt method used to get a random integer between two values. Html Code Javascript Full code I … Read more

Generate Random Hex Color Code in JavaScript

In this blog post, we learn how to generate random hex colors in javascript. There are too many methods to generate Hex color. I shared one of the easiest methods. Hexadecimal color values are also supported in all browsers. A hexadecimal color is specified with #RRGGBB. #code Another method I hope It will helps you.

Create A Slug Using Jquery

In this blog post, we create a slug of string or title using Jquery. The slug is commonly used to represent the URL. Which is important for SEO. Here we use replace() method of jquery. The replace() the method returns a new string with some or all matches of a pattern replaced by a replacement. HTML Jquery Result I hope … Read more

Print Specific Div Using Javascript and Jquery

Print Specific Div Using

In this post, I shared jquery code to print a specific div. Often we need to print invoices or tables. So instead of printing the entire page, we have to print the specific div. We can easily do this task through jquery. Print Div Using Javascript Javascript Print Div Using JQuery Html Jquery I hope … Read more