Posts

Showing posts from March, 2025

CSS:- (CAS CADING style sheet)

 CSS:- html:- (only for designing concept) JavaScript:- (event handling concept) CSS:- (page arrangement)    CSS:- (CAS CADING style sheet) (cas cading style sheet) 1. cas cading:- - cas cading is process for code sharing approche. 2.style- attributes (height,width,etc.) 3.sheet-file. - css is collection of attributes (height,width,color,) - css can not used (<>)tag symbol. - html attributes is used to (=) operators. - css attributes is used to (:) operators. EX.    html- height="100"    css- height:100;     - all numerical element in css is used to (px) symbol.   EX.      height:100px; - In html file is called page.(about,contact,etc) - In Css the file is called (sheet). - types of CSS:-      1-Internal CSS   2-External CSS   3-Inline CSS   4-cross CSS 1) INLINE CSS:- - inline CSS is directly used with Tag(<>). -css is representing style attributes. SYNTEX:-  <tagname styl...

DOM:- (Document object model)

 DOM:- (Document object model) -document object model is representing all types of document process. -document object model is used to document keyword. -there are following implementation used in document object model       1)display title of the document:-   2)display URL of the document:-   3)display number of the link of the document:-   4)display number of the image of the document:- 1)display title of the document:- -title print karana ho tb  <html> <head> <title> THIS IS MY FIRST APPLICATION </title> <script language="JavaScript">   function display()  {  document.getElementById("P1").innerHTML=document.title;  } </script> </head> <body> <p id="P1"> </p> <br> <button onclick="display()"> SUBMIT </button> </body> </html> 2)display URL of the document:- -link print karane ke liye use hota hai  <html> <head> ...

HOW TO CHECK TEXT BOX DATA VALUE IS BLANK OR NOT &&& EXCEPT NUMERICAL DATA VALUE:

 HOW TO CHECK TEXT BOX DATA VALUE IS BLANK OR NOT:- - check the blank data value usmei "" or null bhi chalta hai.  <html> <head> <script language="JavaScript">      function display()   {   var name;   name=document.getElementById("T1").value;   if (name=="")     {     alert("please input proper data");     }   else     {     alert("your data is valid");     }   } </script> </head> <body> <input  type="text" id="T1"> <br> <button onclick="display()"> submit </button> </body> </html> ------------------------------------- EXCEPT NUMERICAL DATA VALUE:- <html> <head> <script language="JavaScript">   function input()   {   var num;   num=document.getElementById("T1").value;       if(isNaN(num))     {     alert("please accept only n...

condition management IF, ELSE, ELSEIF

  condition management:- if-else,else-if, else-otherwise ke jagh pe else = if =condition IF & ELSE:- <html> <head> <script language="JavaScript">  var age;  age=parseInt(prompt ("enter your age"));  if(age>18)  {  document.write("you can vote");  }  else  {  document.write("you can not vote");  }  </script> </head> </html> ELSEIF:- -elseif=multiple condition pe elseif - last mei single else complusory var per;   per=parseInt(prompt("enter your percentage"));   if(per>=60)   {   document.write("A grade");   }   else if(per>50 && per<60)   {   document.write("B grade");   }   else if(per>40 && per<50)   {   document.write("C grade");   }   else   {   document.write("fail");   }

HOW TO GET DATA FROM TAG ELEMENT

 HOW TO GET DATA FROM TAG ELEMENT:- 1)in this concept using name attribute in form control. EX.     <input type="text" name="T1"> 2)insight form tag using two special attribute.   1.NAME   2.ONSUBMIT  <html> <head> <script language="JavaScript">  function display()  {  var name=document.myform.M1.value;  document.write(name);  }  </script> </head> <body> <form name="myform" onsubmit="return display()">  <input type="text" name="M1"> <br> <input type="submit" value="register"> </form> </body> </html>

WORKING OF TEXTBOX

 WORKING OF TEXTBOX:- -In javascipt all textbox accepting data in a form of value.  (input box jab bhi aayega tab  getelement mei value lagega) <html> <head> <script language="JavaScript">   function addition()   {   var a,b,c;   a=parseInt(document.getElementById("T1").value);   b=parseInt(document.getElementById("T2").value);   c=a+b;   document.getElementById("T3").value=c;    }  </script> </head> <body> enter first number  <br> <input type="text" id="T1"> <br> enter second number  <br> <input type="text" id="T2">  <br> result is  <br> <input type="text" id="T3"> <br> <button onclick="addition()"> submit </button> </body> </html>

HOW TO DISPLAY EXPRETION INSIDE THE TAG

  HOW TO DISPLAY EXPRETION INSIDE THE TAG:- <html> <head> <script language="JavaScript">    function display()   {  var a=10;  document.getElementById("p1").innerHTML=10+20+30/2;  }   </script> </head> <body> <p id="p1"> </P> <br> <button onclick="display()"> SUBMIT </button> </body> </html>

DISPLAY VARIABLE VALUE INSIDE THE TAG

 DISPLAY VARIABLE VALUE INSIDE THE TAG:-    <html> <head> <script language="JavaScript">    function display()   {  var a=10;  document.getElementById("p1").innerHTML=a;  }   </script> </head> <body> <p id="p1"> </P> <br> <button onclick="display()"> SUBMIT </button> </body> </html>

HOW TO ACCESS HTML TAG INSIDE JAVASCRIPT

 HOW TO ACCESS <HTML> TAG INSIDE JAVASCRIPT:- -In this concept using two specific methods 1)using control ID method. 2)getelement by ID method. 1)CONTROL ID METHOD:- -in this method provides ID attribute in <HTML>. EX.    <p id="p1"> </p>    <font id="f1"> </font>     2)GETELEMENT BY ID METHOD:- - in this method Access all Tag using specific ID. SYNTAX:-       getElementById("id") EX.   getElementById("p1")   getElementByID("f1") <html> <head> <script language="JavaScript">  function display()  {  document.getElementById("p1").innerHTML="Welcome";  }   </script> </head> <body> <p id="p1"> </P> <br> <button onclick="display()"> SUBMIT </button> </body> </html>