Posts

Showing posts from January, 2023

Assesment 1

 SET-1) < html lang = "en" > < head > < meta charset = "utf-8" > < title > Change the Background Color with JavaScript </ title > </ head > < body >     < h1 id = "heading" > This is a heading </ h1 >     < p > This is a paragraph of text. </ p >     < hr >     < table >         < tr >         < td >< label > Change Webpage Background To: </ label >< td >         < td >         < button type = "button" onclick = " bodybg ('yellow'); " > Yellow </ button >         < button type = "button" onclick = " bodybg ('lime'); " > Lime </ button >         < button type = "button" onclick = " bodybg ('orange'); " > Orange </ button >         < button type =...

Exercise 4

1) <! DOCTYPE html > < html lang = "en" > < head > </ head > < body >     < form >         < select id = "color-select" onChange = change_col () >         < option value = "#FFFFFF" style = " background-color:White; color:#000000; " > SELECT </ option >         < option value = "#000000" style = " background-color:black; color:#FFFFFF; " > Black </ option >         < option value = "Gray" style = " background-color:Gray; color:#FFFFFF; " > Gray </ option >         < option value = "#A9A9A9" style = " background-color:DarkGray; color:#FFFFFF; " > DrakGray </ option >         < option value = "#D3D3D3" style = " background-color:LightGray; color:#FFFFFF; " > LightGray </ option >         < option value = "#FFFFFF" style ...

Exercise 3

  1) <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta http-equiv = "X-UA-Compatible" content = "IE=edge" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Generate a random integer </ title > </ head > < body >     < script >         function random ( min , max ){             if ( min == null && max == null ){                 document . write ( 0 + "<br>" );             }             else if ( max == null ){                 document . write ( Math . floor ( Math . random ()* min + 1 )+ "<br>" );             }        ...