Posts

SET(B)Q2

  <! DOCTYPE html >   < html >   < head >   < meta charset = utf-8 />   < title > Draw two intersecting rectangles, one of which has alpha transparency </ title >   </ head >   < body onload = " draw ();" >   < canvas id = "canvas" width = "150" height = "150" ></ canvas > < script >     function draw ()   {       var canvas = document . getElementById ( "canvas" );       if ( canvas . getContext )       {         var context = canvas . getContext ( "2d" );         context . fillStyle = "rgb(256,0,0)" ;         context . fillRect ( 15 , 10 , 70 , 50 );                 context . fillStyle = "rgba(0, 0, 200)" ;         context . fillRect ( 35 , 30 , 70 , 50 );       }   ...

SET(A)Q2

  <! DOCTYPE html >   < html >   < head >   < meta charset = utf-8 />   < title > Draw two intersecting rectangles, one of which has alpha transparency </ title >   </ head >   < body onload = " draw ();" >   < canvas id = "canvas" width = "150" height = "150" ></ canvas > < script >     function draw ()   {       var canvas = document . getElementById ( "canvas" );       if ( canvas . getContext )       {         var context = canvas . getContext ( "2d" );         context . fillStyle = "rgb(256,0,0)" ;         context . fillRect ( 15 , 10 , 55 , 50 );                 context . fillStyle = "rgba(0, 0, 200, 0.6)" ;         context . fillRect ( 35 , 30 , 55 , 50 );       } ...

SET(A) Q1

  <! DOCTYPE html > < html lang = "en" > < head > < meta charset = "utf-8" > < title > JavaScript form validation - checking email </ title > < link rel = 'stylesheet' href = 'form-style.css' type = 'text/css' />       </ head > < body bgcolor = "cyan" > < h2 > ENTER Email ID </ h2 > < form > < input type = 'text' name = 'text1' /> < input type = "submit" name = "submit" value = "Submit" onclick = " ValidateEmail ( text1 )" /> </ form > < script >     function ValidateEmail ( inputText )             {             var mailformat = new RegExp ( '[a-z0-9]+@[a-z]+.[a-z]{2,3}' );             if ( inputText . value . match ( mailformat ))                 {                   ...

Canvas

  TRIANGLE <!DOCTYPE html> <html lang="en"> <body>     <canvas id="myCanvas" width="100" height="130">     </canvas>          <script type="text/javascript">         var c=document.getElementById("myCanvas");         var ctx=c.getContext("2d");         ctx.beginPath();         ctx.moveTo(75,75);         ctx.lineTo(10,75);         ctx.lineTo(10,25);         ctx.fill();     </script> </body> </html> RECTANGLE <!DOCTYPE html> <html lang="en"> <body>     <canvas id="myCanvas" height="300" width="200" height="150">     </canvas>     <script type="text/javascript">         var c=document.getElementById("myCanvas");         var ctx=c.getCon...

XML(All files)

  FILE 1 <?xml version="1.0"?> <cars> <car> BMW </car> <company> sdfgh </company> </cars> FILE 2 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE employees[ <!ELEMENT employee (firstname,lastname,email)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT email (#PCDATA)> <!ELEMENT work (#PCDATA)> <!ENTITY company "google"> ]> <employees>  <employee> <firstname>Dev</firstname> <lastname>Dave</lastname> <email>dev@gmail.com</email> <work> &company; </work>  </employee>  <employee> <firstname>Jay</firstname> <lastname>Dave</lastname> <email>jay@gmail.com</email> <work> &company; </work>  </employee>  <employee> <firstname>Harsh</firstname> <lastname>Dave</lastname...

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 ...