Posts

Showing posts from March, 2024

show result in javascript

html <! doctype html > < html lang = "en" >   < head >     < meta charset = "utf-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1" >     < title > Bootstrap demo </ title >     < script src = "https://kit.fontawesome.com/b766c6b920.js" crossorigin = "anonymous" ></ script >       < link href = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel = "stylesheet" integrity = "sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin = "anonymous" >     < link rel = "stylesheet" href = "../css/style.css" >   </ head >   < body >     < div class = "container" >         < div class = "message" >             < p >< h3 style = " text-align: center;font-wei...

Hex code of color

  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > javascript </ title >     < link href = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel = "stylesheet" integrity = "sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin = "anonymous" >     < link rel = "stylesheet" href = "../css/style.css" > </ head >     < body >       < div class = "container" >         < div class = "hex-colors" >             < h1 > Click The Button below to display the hex code of random color </ h1 >         < h2 > the hex code of the a color  is # < span id = "hex-co...

font

 html css  link

animation color

  html <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > javascript </ title >     < link href = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel = "stylesheet" integrity = "sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin = "anonymous" >     < link rel = "stylesheet" href = "../css/style.css" > </ head >     < body >       < div class = "container" >         < div class = "hex-colors" >             < h1 > Click The Button below to display the hex code of random color </ h1 >         < h2 > the hex code of the a color  is # < span id = "h...

Background change

 var index = 0; function changeColors(){     var colors = ["yellow","red","green","orange","purple","blue"];     document.getElementsByTagName("body")[0];     style.background = colors[index++];     if(index > colors.length - 1 )     index = 0; }

expensetracker.js

  // Initial Data let tableEntries = [      { type: 1, name: "income" , amount: 25000 },      { type: 0, name: "rent" , amount: 18000 },      { type: 0, name: "food" , amount: 5000 }, ];     // Function to update data expense summary function updateSummary() {      let totalIncome = tableEntries.reduce((t, e) => {          if (e.type === 1) t += e.amount;          return t;      }, 0);      let totalExpense = tableEntries.reduce((ex, e) => {          if (e.type === 0) ex += e.amount;          return ex;      }, 0);      updatedInc.innerText = totalIncome;      updatedExp.innerText = totalExpense;      update...