Last Post was done with HTML,CSS .
Let Begin with Java Script
Why we need to study java script ?
We learnt about HTML which is used to define the content of web pages
And CSS to specify the layout of web pages,now
JavaScript to program the behavior of web pages
This tutorial is about JavaScript.
> Method to use Javascript in HTML : getElementById().
In This example uses the method to "find" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript":
( Notice the capital and small letters)
> Method to use Javascript in HTML,form of CSS: getElementById().
Let Begin with Java Script
JAVA SCRIPT
We learnt about HTML which is used to define the content of web pages
And CSS to specify the layout of web pages,now
JavaScript to program the behavior of web pages
This tutorial is about JavaScript.
> Method to use Javascript in HTML : getElementById().
In This example uses the method to "find" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript":
Example
document.getElementById("demo").innerHTML = "Hello JavaScript";
( Notice the capital and small letters)
> Method to use Javascript in HTML,form of CSS: getElementById().
Example
document.getElementById("demo").style.fontSize = "20px";
The SCRIPT Tag :
In HTML, JavaScript code must be inserted between <script> and </script> tags.
Example
<script>
document.getElementById("demo").innerHTML = "My First JavaScript";
</script>
The next part will be continued in the next session of the blog...!!
No comments:
Post a Comment