Monday, February 9, 2015

JavaScript Can Change HTML Styles

JavaScript Can Change HTML Styles:

In this post i want to change style of html content by javascript on button click.


<h1>Change css by JavaScript Do?</h1>

<p id="htmlp"> hello friend the content style will be change on button click</p>

    function myJavascript_Function() {
        var x = document.getElementById("htmlp"); = "20px"; = "green";

<button type="button" onclick="myJavascript_Function()">Click here For Change</button>

</html> Related Post :

No comments:

Post a Comment