Posts

HTML5 and CSS3 Beginner Tutorial 1

Image
Hi Friends , I have already introduced about HTML . If you are seeing this blog and reading my post means i think you want to know about some thing about HTML and Web development . I have not created the following tutorial . But i thing it will be very useful for you to know more about HTML    HTML5 and CSS3 Beginner Tutorial 1

How to delete the selected Div

here is simple image gallery Program . When we Click that particular div will be deleted  . it will delete all the div until the last Element. Here is the Code <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title></title>     <style>         #box1, #box2, #box3, #box4, #box5 {             width:150px;             height:150px;             border:1px solid red;             display:block;                   }         li {     display: inline; } #box1{     background-color:red; ...

How to hide and show a element with if else condition .

How to hide and show a element with if else condition . in this program , when we click the button it will check the 'myDiv' is hidden or not . If it is hidden it will change the css property so that the element will show . other wise it will be hide . <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title></title>     <style>     #myDiv{         width:300px;         height:200px;         background:Red;            }         </style> </head> <body>     <div id="myDiv">     </div>     <button onclick="myFunction()">Click</button><!-- When user clicks on the this Button it will call myFunctio...

How to Loop through the Java Script Arrays

Image
How to iterate the data in an Array or the j son ? Fist Let us have one simple Array with few objects inside Example: var states=[{"name":"Andhra Pradesh"}, {"name":"Karnataka"}, {"name":"Telangana"}, {"name":"Kerala"}, {"name":"Tamil Nadu"} ] To display the Data we have to loop the Array . So let us use for loop for the same ; for (var i =0;i<states.length;i++){  document.write (states[i].name) } If you have multiple data values in the objects inside the array , you have to use the property of that object next to the array . For example let us add one more value to the existing Array . var states=[{"name":"Andhra Pradesh","capital":"Amaravathi"}, {"name":"Karnataka","capital":"Bangalore"}, {"name":"Telangana","capital":"Hyderabad"}, {...

Java Script arrays

Image
Java Script arrays are used to store multiple values  in a single variables . It may single value or collection of objects . Arrays are very important in Java Script. Let us look how can we create arrays in Java Script. we can create Java script arrays as follows . var subjects=["Telugu","Tamil","Hindi","English "] ; we can also create Java script arrays  as follows var subjects=[]; this indicates an empty array with the name of subjects; let us add some values for the arrays . Arrays value positions are started from 0 . It means in the above example the index (position )  of the Telugu is "0", and Tamil is "1", so we can add the values for the array in as follows. subjects[0]="Telugu"; subjects[1]="Tamil"; How can we retrieve or Iterate the Data from an array ? we can do it in two different methods .  The first way of doing this is by using the for loop . First wee need to find out th...

javascript objects tutorial

In JavaScript Every thing is considered as an Object except Boolean Values . Creating and Objects and accessing its properties are very important tasks in Java script. Let us discuss about an object with an Examples . Let us create an object of a "Person" <script> var person={}; This Indicates an empty object with a name of person. person.firstName="Murali"; This indicates Object having a property of First Name and its value is Murali. person.lastName="Krishna"; This indicates Object having a property of First Name and its value is Krishna. person.company="HP";This indicates Object having a property of Company  and its value is HP. </script> Now Let us look how can we access the object Properties . To access the Property of an object we have to access the object. Console.log(person.firstName); it will give the value of the person Fist name . In same way we can access all the properties.

How To Create A multiplication Table

Hi Friends i Have create a simple program to Display the Multiplication Table . In This I have used two For loops . Step 1: We will get the user input and we are storing that value in to " table " variable as follows. var table = prompt("How Many Tables you Want"); Step 2 : We are starting our table from to and we will with the User data "table " with the following  for Loop  for (var i = 2; i <=table ; i++); Then we are creating the div dynamically and inserting the Generated As Follows.. <!DOCTYPE html> <head>     <title></title>     <style>        div {         float: left;     margin: 10px;     font-size:large;     width: 130px; }     </style> </head> <body>     <script>         (function () {   ...