JavaScript is a scripting language that is popular on the internet and can work on most of the popular web browsers such as Internet Explorer (IE), Mozilla Firefox, Netscape and Opera. JavaScript code can be inserted into a web page using the SCRIPT tag.
JavaScript code is usually written in the form of a function that is placed in the <head> which opened with the <script type = "text / javascript">.
<script type = "text / javascript">
alert ("Hello World!");
</ script>
JavaScript code can also be placed in a separate file extension .js (abbreviation of JavaScript). To call the JavaScript code contained in the file itself, at the beginning of the <head> should be determined in advance .js file name is used as code examples the following:
<script type = "text / javascript" src = "alamat.js">
</ script>
The script in the head:
This script will be executed when called (usually a function) or called by a trigger on a specific event. The placement of the script in the head will ensure the scripts are loaded before being used (called).
<html>
<head>
<script type = "text / javascript">
...
</ script>
</ head>
</ html>
Script in the body:
This script is executed when the page is loaded up in the <body>. [7] When placing the script in the <body> means between content and JavaScript into one piece. [7]
<html>
<head>
</ head>
<body>
<script type = "text / javascript">
...
</ script>
</ body>
</ html>
Number of JavaScript in the <head> and <body> tags are placed on the document is not limited
External Script:
Sometimes there is a need to run the same JavaScript in multiple times on different pages, but do not want to have to rewrite the busy if desired script on each page. [7] Thus JavaScript can be written in the file externally. [7] Thus, the document HTML and JavaScript are separated, then the file is called from the HTML document. [7] the JavaScript file is saved with the extension .js. [7]
JavaScript: js / xxx.js document.write ("This message appears when the page is loaded");
To use an external JavaScript (.js) used the attribute "src" in the <script> tag in the HTML page. [7]
<html>
<head>
</ head>
<body>
<script src = "xxx.js">
</ script>
<p> The above script is in the file "xx.js" (external) </ p>
</ body>
</ html>
History Jav Script:
JavaScript was first developed by Brendan Eich of Netscape under the name Mocha, which later renamed LiveScript, and eventually became JavaScript.
Previously Navigator supports Java can be used to further the non-Java programmers. So it is developing a programming language named LiveScript to accommodate it. This programming language that eventually evolved and named JavaScript, although there is no relationship between the Java language with JavaScript.
JavaScript can be used for many purposes, for example to create rollover effects in both the image and the text, and that is important as well is to make AJAX. JavaScript is a language that is used for AJAX
Source :
http://id.wikipedia.org/wiki/JavaScript
Keyword :
#what is java, #java, #java tutorial, #learn java, #java language, #java applet, #java tutorials, #java programming language, #learning java, #how to learn java, #java 6, #learn java online, #learn java online, #sun microsystems java, #install java, #java developer, #java basics, #free java download, #java free download, #java applets, #java updates, #free java, #java software, #java coding, #java 1.6, #java install, #sun java download, #latest java, #java virtual machine, #download latest java, #latest version of java, #java scripting, #java tutorial for beginners, #introduction to java, #java 1.6 download, #what is java script, #java installation, #java classes, #java plug in, #download free java, #download java free, #java learning, #java downloads, #sun java, #java compiler, #advanced java, #java platform, #java download, #free download java, #what is java programming, #about java, #download java 6, #core java tutorial, #java 6 download, #java plugin, #java code, download java, #what is java used for, #instal java
Belum ada tanggapan untuk "Java Script"
Post a Comment