<div id="myDiv">My Text</div>
<script>
var myDiv=document.getElementById('myDiv');
console.log(myDiv);
console.log(myDiv.innerHTML);
console.log(myDiv.id);
</script>
<script>
var myObj={fruit:'Apple',color:'green',gravitation:function(){var o=this; console.log(this.fruit+' color is '+this.color+' falls from the tree');}}
for(var i in myObj){
console.log(i+' = '+myObj[i]);
}
myObj.gravitation():
</script>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.