Thursday, August 15, 2013

JavaScript object direct instance

<html>
<body>

<script type="text/javascript">
personObj=new Object();
personObj.firstname="Fazle";
personObj.lastname="Hasan";
personObj.age=63;
personObj.eyecolor="black";

document.write(personObj.firstname + " is " + personObj.age + " years old.");
</script>

</body>
</html>

Result

 


No comments: