Sunday, September 17, 2017

JavaScript can do

JavaScript accepts both double and single quotes

JavaScript Can Change HTML Content


document.getElementById("demo").innerHTML = "Hello JavaScript";  

JavaScript Can Change HTML Attributes

document.getElementById('myImage').src='pic_bulbon.gif'

JavaScript Can Change HTML Styles (CSS)

document.getElementById("demo").style.fontSize = "25px";

JavaScript Can Hide HTML Elements

document.getElementById("demo").style.display = "none";

JavaScript Can Show HTML Elements

document.getElementById("demo").style.display = "block";

 

 

 

No comments:

Post a Comment