Html Javascript

Discussion in 'Web Design' started by ayay, Aug 31, 2016.

  1. ayay

    ayay Rookie!!!

    The HTML <script> Tag
    The <script> tag is used to define a script (JavaScript).

    The <script> element either contains scripting statements.
    Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content ETC>>>

    The script below writes Hello JavaScript! into an HTML element with id="demo":
    EXAMPLE
    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First JavaScript</h1>

    <p>JavaScript can change the content of an HTML element:</p>

    <button type="button" onclick="myFunction()">Click Here!</button>

    <p id="demo">This is a EXAMPLE.</p>

    <script>
    function myFunction() {
    document.getElementById("demo").innerHTML = "Welcome to JACKOBIAN";
    }
    </script>

    </body>
    </html>
     
  2. Loading...

    Similar Threads - Html Javascript Forum Date
    Let's Build Something Maybe Html Game Web Design May 10, 2017
    Html Styles Web Design Aug 31, 2016
    Learn How To Use Html Web Design Aug 28, 2016
    Hello Html5... Web Design Jul 22, 2016
    Best Android App To Learn Html Web Design Jul 17, 2016

  3. ayay

    ayay Rookie!!!

    JavaScript can change HTML Font


    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First JavaScript</h1>

    <p id="demo">Jackobian will Change.</p>

    <script>
    function myFunction() {
    document.getElementById("demo").style.fontSize = "25px";
    }
    </script>

    <button type="button" onclick="myFunction()">Click Me!</button>

    </body>
    </html>