Knowledge Walls
Ammu
Hyderabad, Andhra Pradesh, India
Passcode:
Where to write javascript in Examples of Javascript 1
737 Views
Types 
Can be internal /external.
Internal means either body or head.

type="text/javascript"- not mandatory
Examples for Internal
<!DOCTYPE html>
    <html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <title>internal</title>
        <script>
            //external body
            alert("hello");
        </script>
    </head>
    <body>
        <script>
            //internal body
            alert("hello1");
        </script>
    </body>
</html>
Examples for external
<!DOCTYPE html>
    <html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <title>internal</title>
        <script type="text/javascript" src="external.js">
            alert("hello");
        </script>
    </head>
    <body>
        
    </body>
</html>
External.js 
alert("external");
Next Topics
Next lessons of current book.
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Best Lessons of "Javascript 1"
Top lessons which are viewed more times.
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
Examples of Javascript 1
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details