Thursday, 21 January 2016

Javascript Objects Example

<!DOCTYPE html>
<html>
<body>
<script>
var person={
firstname : "John",
lastname  : "Doe",
id        :  5566
};
document.write(person.lastname + "<br>");
document.write(person["lastname"] + "<br>");
</script>
</body>

</html>

Related Posts:

  • JavaScript Break and Continue The Break Statement }The break statement "jumps out" of a loop. The break statement breaks the loop and continues executing the code after the loo… Read More
  • Date Object ¨The Date object is used to work with dates and times. ¨Date objects are created with new Date(). ¨There are four ways of instantiating a date: … Read More
  • Form Validation Limit minimum length if (document.form1.password.value.length < 6) { alert("Please give a Password more than 5 characters");   &n… Read More
  • Math Object ¨The Math object allows you to perform mathematical tasks. ¨All properties/methods of Math can be called by using Math as an object, without creatin… Read More
  • Validations using javascripting Form Validation  ¨No field should be left blank ¨ Email should contain asterik & dot or period symbols ¨Limit minimum length ¨Confirm Pas… Read More

0 comments:

Post a Comment