Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Display array inside a paragarph tag

    using javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 637
    Comment on it

    Java Script arrays are used to store more than one values in a single variable. In the below given example we will use script to display array (var= names) data inside a <p> (paragraph) tag of HTML with id="display".

    <!DOCTYPE html>
    <html>
    <body>
    <p id="display"></p>
    <script>
    var names = ["Albert", "Rocky", "Advard"];
    document.getElementById("display").innerHTML= names;
    </script>
    </body>
    </html>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
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: