Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

HTML LECTURE NOTE ( HYPER TEXT MARKUP LANGUAGE- NETWORK COMUTING MODULE 1 PDF)

Rating
-
Sold
-
Pages
29
Uploaded on
09-03-2023
Written in
2017/2018

COMPLETE LECTURE NOTE ON HTML(HYPER TEXT MARKUP LANGUAGE. THIS CHAPTER COVERS THEORY PART WITH EXAMPLES HTML LANGUAGE. HTML TAGS, COMMENTS IN HTML,HTML LIST, TABLE,FRAME TAG,IMAGE MAPS,CSS ETC

Institution
Course

Content preview

NETWORK COMPUTING – MODULE 2


MODULE 2

CLIENT-SIDE SCRIPTING
"Client-Side" refers to activities that happen on the client machine. -- for example, form
validation is normally done at client. In the case of registration form some fields are set as
mandatory. Before submitting the form to the server the client can verify the validity of that
fields. In some other cases we can set the type of data that can be entered in to a field, for
example age field contains only numbers. Here also the client can verify the validity.
"Scripting" is a kind of programming, or coding. (These terms have some differences, but
are generally interchangeable.)
Client-side scripts run on the client.


INTRODUCTION TO JAVA SCRIPT

JavaScript is the most popular scripting language on the internet, and works in all major
browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, and Opera.

 JavaScript was designed to add interactivity to HTML pages
 JavaScript is a scripting language

 A scripting language is a lightweight programming language

 A JavaScript consists of lines of executable computer code

 A JavaScript is usually embedded directly into HTML pages

 JavaScript is an interpreted language (means that scripts execute without preliminary
compilation)

 Everyone can use JavaScript without purchasing a license

 JavaScript gives HTML designers a programming tool - HTML authors are normally not
programmers, but JavaScript is a scripting language with a very simple syntax! Almost
anyone can put small "snippets" of code into their HTML pages

, NETWORK COMPUTING – MODULE 2


 JavaScript can put dynamic text into an HTML page - A JavaScript statement like this:
document. write("<h1>" + name + "</h1>") can write a variable text into an HTML page

 JavaScript can react to events - A JavaScript can be set to execute when something
happens, like when a page has finished loading or when a user clicks on an HTML
element

 JavaScript can read and write HTML elements - A JavaScript can read and change the
content of an HTML element

 JavaScript can be used to validate data - A JavaScript can be used to validate form data
before it is submitted to a server. This saves the server from extra processing

 JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect
the visitor's browser, and - depending on the browser - load another page specifically
designed for that browser

 JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve
information on the visitor's computer


Variables

A variable is a "container" for information you want to store. A variable's value can change
during the script. You can refer to a variable by name to see its value or to change its value.

Rules for variable names:

 Variable names are case sensitive
 They must begin with a letter or the underscore character

JavaScript is case-sensitive!

Declare a Variable

You can create a variable with the var statement:

var strname = some value

, NETWORK COMPUTING – MODULE 2


You can also create a variable without the var statement: strname = some value

Assign a Value to a Variable

You can assign a value to a variable like this:

var strname = "Hege"

Or like this:

strname = "Hege"

The variable name is on the left side of the expression and the value you want to assign to the
variable is on the right. Now the variable "strname" has the value "Hege".

Lifetime of Variables

When you declare a variable within a function, the variable can only be accessed within that
function. When you exit the function, the variable is destroyed. These variables are called local
variables. You can have local variables with the same name in different functions, because each
is recognized only by the function in which it is declared.

If you declare a variable outside a function, all the functions on your page can access it. The
lifetime of these variables starts when they are declared, and ends when the page is closed.


Operators
Arithmetic Operators

Operator Description Example Result
x=2,y=2
+ Addition 4
x+y
x=5,y=2
- Subtraction 3
x-y
x=5,y=4
* Multiplication 20
x*y
15/5 3
/ Division
5/2 2.5
5%2 1
% Modulus (division remainder) 10%8 2
10%2 0

Written for

Institution
Course

Document information

Uploaded on
March 9, 2023
Number of pages
29
Written in
2017/2018
Type
Class notes
Professor(s)
Dhanya
Contains
All classes

Subjects

$10.79
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
aswathyks

Get to know the seller

Seller avatar
aswathyks MAHATMA GANDHI UNIVERSITY
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions