LO2; UNDERSTAND THE FUNDAMENTALS OF A SCRIPTING LANGUAGE
UNIT 20 P3: EXPLAIN THE FUNDAMENTALS OF A SCRIPTING LANGUAGE
INTRODUCTION:
For this task I have been asked to explain the fundamentals of a scripting language. Within this section of this document will be a variety of information about JavaScript and JQuery. Both JavaScript and JQuery are not programming languages, JavaScript is a scripting language and JQuery is a library.
What is a scripting language?
A scripting language is a programming language that supports scripts. It also interprets and executes one command at a time, and in JavaScript's case interpreted by the internet browser. There are a wide range of scripting languages that are used. But the main scripting language that is used in web development is JavaScript, which will be spoken about below.
JAVASCRIPT
JavaScript is a scripting language that is used for websites and it is also compatible with most internet browsers, for example; Internet Explorer, Firefox and Google Chrome. Many people think that Java is shortened from JavaScript, but they are two different languages. Java is a programming language whereas JavaScript is a scripting language. JavaScript and Java share a variety of features, for example; if statements, variables and many more others. JavaScript and Java share similar controls, such as; variables (must be identified and declared), adding functionality and communicating with the client side.
The difference between JavaScript and Java is, Java creates applications that run in a virtual machine or browser, whereas JavaScript code is run on the internet browser only.
JavaScript is mainly used on the client side which is then through the internet browser, in which is also used with a combination of CSS and HTML. Some scripting languages require a plug in, whereas JavaScript does not require a plug in. The reason for this is because most internet browsers are compatible with JavaScript.
<!DOCTYPE html>The difference between JavaScript and Java is, Java creates applications that run in a virtual machine or browser, whereas JavaScript code is run on the internet browser only.
JavaScript is mainly used on the client side which is then through the internet browser, in which is also used with a combination of CSS and HTML. Some scripting languages require a plug in, whereas JavaScript does not require a plug in. The reason for this is because most internet browsers are compatible with JavaScript.
<html>
<head>
<title>JS3</title>
<script>
function changeHTML()
{
document.getElementById("Nicole").innerHTML = "Paragraph has been changed";
var aname= prompt("Enter your first name");
var anum = prompt("What is your favourite food");
}
</script>
</head>
<body>
<div id="Nicole" onclick="changeHTML();">Text on the page</div>
</body>
</html>
This code allows the users to input information such as their first name (Nicole) and what is their favourite food (chicken). This questions will only be asked when the user is looking at the website on the internet. After they have answered the questions, the user will be able to navigate around the website.
JQUERY;
The purpose of JQuery is to make it easier for JavaScript to create a website. JQuery is a JavaScript library that holds a variety of features and functions.
JQuery is a library that makes the creation of a piece of code in JavaScript easier. Adding pre-existing functions and features to make it easier to use JavaScript. The reason for this is because JavaScript is case sensitive and will not work if they are not done efficiently, and offers a series of pre determined functions that allow for the user to use JavaScript more effectively such as getElementByID.
https://www.w3schools.com/jquery/jquery_intro.asp
JQuery is a library that makes the creation of a piece of code in JavaScript easier. Adding pre-existing functions and features to make it easier to use JavaScript. The reason for this is because JavaScript is case sensitive and will not work if they are not done efficiently, and offers a series of pre determined functions that allow for the user to use JavaScript more effectively such as getElementByID.
https://www.w3schools.com/jquery/jquery_intro.asp
No comments:
Post a Comment