Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to change the data inside the div dynamicaly via Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 101
    Comment on it

    Hello Reader's if you are developing the website that convert the real time data into the div, Then by using Javascript you can do it. Let's see the example as below:-

    <!DOCTYPE html>
    function myFunction() {
        document.getElementById("change").innerHTML = "Now this is the dynamic data.";
    <p id="change">This will be hcange on click the buttun</p>    
    <button type="button" onclick="myFunction()">Try it</button>    

    Here in this code the initial div will be blank but when user click on the toggle button the data inside the div will be change and output will be like this:-

    Now this is the dynamic data.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: