Search This Blog

Tuesday, 31 January 2017

Write a javascript program to display “hello world” using internal javascript and external javascript.

Practical - 1

Internal JavaScript -

prac1.html

<html>
    <head>
    <title>Practicle 1 JS</title>
    <script>
        document.write("Hi this is karan Gajjar");
    </script>
    </head>
    </html>

------------------------------------------------------------------------------------------------

External JavaScript -

pract1(2).html

<html>
    <head>
    <title>Practicle 1 JS</title>
    <script src = "prac1.js">
    </script>
    </head>
    </html>

prac1.js

var str = "Karan Gajjar - Android Developer";
var result = str.link("https://goo.gl/gmzl4t");
document.write(result);

No comments:

Post a Comment