SlideShare ist ein Scribd-Unternehmen logo
1 von 23
JAVASCRIPT TO NON
PROGRAMMERS

JAVASCRIPT




Webteacher Software now offers
Welcome To
JavaScript for the Total Non-
Programmer
This tutorial will take you step by step
through the fundamentals of Javascript.
You will learn how to write functions, use
data from text boxes, create IF-THEN
conditionals, program loops, and
generally make your web page
"smarter."
I teach computer classes for a living to
corporate clients of all levels. After 2
years of teaching, I have learned a lot
about communication between people of
various levels of computer experience.
This tutorial assumes that you have no
prior programming experience, but that
you have created your own HTML pages.
If you find this tutorial helpful, please let
me know (it's my only reward). Also,
links are graciously accepted.
What is JavaScript?
Javascript is an easy-to-use
programming language that can be
embedded in the header of your web
pages. It can enhance the dynamics and
interactive features of your page by
allowing you to perform calculations,
check forms, write interactive games,
add special effects, customize graphics
selections, create security passwords
and more.
What's the difference between
JavaScript and Java?
Actually, the 2 languages have almost
nothing in common except for the name.
Although Java is technically an
interpreted programming language, it is
coded in a similar fashion to C++, with
separate header and class files, compiled
together prior to execution. It is
powerful enough to write major
applications and insert them in a web
page as a special object called an
"applet." Java has been generating a lot
of excitment because of its unique ability
to run the same program on IBM, Mac,
and Unix computers. Java is not
considered an easy-to-use language for
non-programmers.
Javascript is much simpler to use than
Java. With Javascript, if I want check a
form for errors, I just type an if-then
statement at the top of my page. No
compiling, no applets, just a simple
sequence.
What is Object Oriented
Programming?
Everyone that wants to program
JavaScript should at least try reading the
following section. If you have trouble
understanding it, don't worry. The best
way to learn JavaScript is from the
examples presented in this tutorial. After
you have been through the lessons,
come back to this page and read it
again.
OOP is a programming technique (note:
not a language structure - you don't
even need an object-oriented language
to program in an object-oriented
fashion) designed to simplify
complicated programming concepts. In
essence, object-oriented programming
revolves around the idea of user- and
system-defined chunks of data, and
controlled means of accessing and
modifying those chunks.
Object-oriented programming consists of
Objects, Methods and Properties. An
object is basically a black box which
stores some information. It may have a
way for you to read that information and
a way for you to write to, or change,
that information. It may also have other
less obvious ways of interacting with the
information.
Some of the information in the object
may actually be directly accessible;
other information may require you to
use a method to access it - perhaps
because the way the information is
stored internally is of no use to you, or
because only certain things can be
written into that information space and
the object needs to check that you're
not going outside those limits.
The directly accessible bits of
information in the object are its
properties. The difference between data
accessed via properties and data
accessed via methods is that with
properties, you see exactly what you're
doing to the object; with methods,
unless you created the object yourself,
you just see the effects of what you're
doing.
Other Javascript pages you read will
probably refer frequently to objects,
events, methods, and properties. This
tutorial will teach by example, without
focusing too heavily on OOP vocabulary.
However, you will need a basic
understanding of these terms to use
other JavaScript references.
Objects and Properties
Your web page document is an object.
Any table, form, button, image, or link
on your page is also an object. Each
object has certain properties
(information about the object). For
example, the background color of your
document is written
document.bgcolor. You would change
the color of your page to red by writing
the line: document.bgcolor="red"
The contents (or value) of a textbox
named "password" in a form named
"entryform" is
document.entryform.password.value
.
Methods
Most objects have a certain collection of
things that they can do. Different
objects can do different things, just as a
door can open and close, while a light
can turn on and off. A new document is
opened with the method
document.open() You can write "Hello
World" into a document by typing
document.write("Hello World") .
open() and write() are both methods
of the object: document.
Events
Events are how we trigger our functions
to run. The easiest example is a button,
whose definition includes the words
onClick="run_my_function()". The
onClick event, as its name implies, will
run the function when the user clicks on
the button. Other events include
OnMouseOver, OnMouseOut, OnFocus,
OnBlur, OnLoad, and OnUnload.




                                           Webt
                                           Chap
                                           This i
                                           box w
below
Type
HOW
Here'
minu
break
<HTM
<HEA
<SCR
<!-- B
funct
alert
// - E
</SC
</HE
<BOD
<FOR
<INP
<INP
onClic
</FO
</BO
</HT




Webt
First
2 seg
You s

<HTM
<HE

(Stuf
</HE
<BO

(The
</BO
</HT




Webt
In the
introd
All br
JavaS
along
your
<SCR
The <
from
<SCR
to ke
This i
sectio


<HTM
<HE

<SCR
< !--
(all o
// - E
</SC
</HE




Webt
You c
to na
Kalam
A fun

funct

(stuff
This a
variab
variab




The v
The c
funct
The a
a piec
Alert(
Alert(
and w
"Hello
put th
Some
Alert(
then

<HTM
<HE
< !--

funct
alert
// - E
</SC
</HE
Webt
The F
used
JavaS
objec
All fo
</FO
The t
The N
which
TYPE
butto
For e
<INP
The b
funct
and O
The N
JavaS
The V
The O
the n
For e
<INP
onClic
<BOD

<FOR

<INP
<INP
onClic
</FO
</BO
</HT
We e
onClic
This m
progr
the p
text1
huh?
OK, t
butto
name
numb
form.
typed
If this
you e
onCli
funct
That'
funct
comm
all to
Webt
Here
works
<HTM
<HEA
<SCR
<!-- B
funct

docum
// - E
</SC
</HE
<BOD
<form
<inpu
oncli
<inpu
oncli
<inpu
oncli
<inpu
oncli
</for
</BO
</HT




Webt
funct
docum
}
This p
used
funct
docum
You p
color.
If I ty
turn r
By wr
allow
want.
Later
onClic
onClic
thing
 1.Ru
 2.co




Webt
Clic
k
the
ima
ge
to
ente
ra
pas
swo
rd
prot
ecte
d
doc
ume
nt.
Try
a
wro
ng
entr
javscript

Weitere ähnliche Inhalte

Was ist angesagt?

Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>tutorialsruby
 
[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1Jae Woo Woo
 
UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04Rafael Alvarado
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2borkweb
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7phuphax
 
Html beginner
Html beginnerHtml beginner
Html beginnerwihrbt
 
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery TrainingCartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery TrainingShane Church
 
Semantics & the Mobile Web
Semantics & the Mobile WebSemantics & the Mobile Web
Semantics & the Mobile Websurferroop
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop NotesPamela Fox
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Ayes Chinmay
 

Was ist angesagt? (19)

Accessibility Usability Professional Summry
Accessibility Usability Professional SummryAccessibility Usability Professional Summry
Accessibility Usability Professional Summry
 
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
 
[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1
 
UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04
 
Asp.Net Mvc Dev Days09
Asp.Net Mvc Dev Days09Asp.Net Mvc Dev Days09
Asp.Net Mvc Dev Days09
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
 
Html beginner
Html beginnerHtml beginner
Html beginner
 
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery TrainingCartegraph Live HTML, CSS, JavaScript and jQuery Training
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
 
Ajax
AjaxAjax
Ajax
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
 
WebCT Basics
WebCT BasicsWebCT Basics
WebCT Basics
 
Web dev syllabus
Web dev syllabusWeb dev syllabus
Web dev syllabus
 
Semantics & the Mobile Web
Semantics & the Mobile WebSemantics & the Mobile Web
Semantics & the Mobile Web
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
 
Mobile web with jQuery Mobile
Mobile web with jQuery MobileMobile web with jQuery Mobile
Mobile web with jQuery Mobile
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
 

Andere mochten auch

Naples Pension Issues
Naples Pension IssuesNaples Pension Issues
Naples Pension IssuesSam Saad
 
20 Year Plan State Of The Bay Report
20 Year Plan   State Of The Bay Report20 Year Plan   State Of The Bay Report
20 Year Plan State Of The Bay ReportSam Saad
 
The Pre Foreclosure Niche Presentation For Real Estate Agent
The Pre Foreclosure Niche Presentation For Real Estate AgentThe Pre Foreclosure Niche Presentation For Real Estate Agent
The Pre Foreclosure Niche Presentation For Real Estate AgentSam Saad
 
7 Reasons Why Every Homebuyer Needs Title Insurance
7 Reasons Why Every Homebuyer Needs Title Insurance 7 Reasons Why Every Homebuyer Needs Title Insurance
7 Reasons Why Every Homebuyer Needs Title Insurance Sam Saad
 
How To Rank On Google In 5 Minutes Using WordPress
How To Rank On Google In 5 Minutes Using WordPressHow To Rank On Google In 5 Minutes Using WordPress
How To Rank On Google In 5 Minutes Using WordPressOrganical - The SEO Experts
 

Andere mochten auch (8)

Presentation Andrea Gorra Hea ics conference 09
Presentation Andrea Gorra Hea ics conference 09Presentation Andrea Gorra Hea ics conference 09
Presentation Andrea Gorra Hea ics conference 09
 
Forex
ForexForex
Forex
 
Naples Pension Issues
Naples Pension IssuesNaples Pension Issues
Naples Pension Issues
 
20 Year Plan State Of The Bay Report
20 Year Plan   State Of The Bay Report20 Year Plan   State Of The Bay Report
20 Year Plan State Of The Bay Report
 
The Pre Foreclosure Niche Presentation For Real Estate Agent
The Pre Foreclosure Niche Presentation For Real Estate AgentThe Pre Foreclosure Niche Presentation For Real Estate Agent
The Pre Foreclosure Niche Presentation For Real Estate Agent
 
7 Reasons Why Every Homebuyer Needs Title Insurance
7 Reasons Why Every Homebuyer Needs Title Insurance 7 Reasons Why Every Homebuyer Needs Title Insurance
7 Reasons Why Every Homebuyer Needs Title Insurance
 
The OLPC Battleground
The OLPC BattlegroundThe OLPC Battleground
The OLPC Battleground
 
How To Rank On Google In 5 Minutes Using WordPress
How To Rank On Google In 5 Minutes Using WordPressHow To Rank On Google In 5 Minutes Using WordPress
How To Rank On Google In 5 Minutes Using WordPress
 

Ähnlich wie javscript

LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxDIPESH30
 
Intro to BackboneJS + Intermediate Javascript
Intro to BackboneJS + Intermediate JavascriptIntro to BackboneJS + Intermediate Javascript
Intro to BackboneJS + Intermediate JavascriptAndrew Lovett-Barron
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorialtutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorialtutorialsruby
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript TutorialDHTMLExtreme
 
4007655 introduction-to-javascript
4007655 introduction-to-javascript4007655 introduction-to-javascript
4007655 introduction-to-javascriptVikash Chandra
 
What is java script
What is java scriptWhat is java script
What is java scriptsumanbaba_73
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistMark Fayngersh
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascriptambuj pathak
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQueryShawn Calvert
 
Developing for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformTaylor Singletary
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptxGangesh8
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJonnJorellPunto
 
Java script Basic
Java script BasicJava script Basic
Java script BasicJaya Kumari
 
High performance websites session1
High performance websites  session1High performance websites  session1
High performance websites session1amr elgarhy
 

Ähnlich wie javscript (20)

LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
 
Intro to BackboneJS + Intermediate Javascript
Intro to BackboneJS + Intermediate JavascriptIntro to BackboneJS + Intermediate Javascript
Intro to BackboneJS + Intermediate Javascript
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorial
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorial
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
Java script hello world
Java script hello worldJava script hello world
Java script hello world
 
4007655 introduction-to-javascript
4007655 introduction-to-javascript4007655 introduction-to-javascript
4007655 introduction-to-javascript
 
What is java script
What is java scriptWhat is java script
What is java script
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQuery
 
Developing for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application Platform
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 
jQuery
jQueryjQuery
jQuery
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
High performance websites session1
High performance websites  session1High performance websites  session1
High performance websites session1
 

Mehr von rcc1964

Backmasking
BackmaskingBackmasking
Backmaskingrcc1964
 
Hermetismo
HermetismoHermetismo
Hermetismorcc1964
 
questoes de info2005 e2006.PDF
questoes de info2005 e2006.PDFquestoes de info2005 e2006.PDF
questoes de info2005 e2006.PDFrcc1964
 
introduccion_ajax
introduccion_ajaxintroduccion_ajax
introduccion_ajaxrcc1964
 
Tutorial Redes Completo
Tutorial Redes CompletoTutorial Redes Completo
Tutorial Redes Completorcc1964
 
COLD FUSION TUTORIAL
COLD FUSION TUTORIALCOLD FUSION TUTORIAL
COLD FUSION TUTORIALrcc1964
 
Aprenda Java como si estuviera en primero (2000)
Aprenda Java como si estuviera en primero (2000)Aprenda Java como si estuviera en primero (2000)
Aprenda Java como si estuviera en primero (2000)rcc1964
 
Curso de lenguaje C
Curso de lenguaje CCurso de lenguaje C
Curso de lenguaje Crcc1964
 
La cara oculta de C++ Builder
La cara oculta de C++ BuilderLa cara oculta de C++ Builder
La cara oculta de C++ Builderrcc1964
 
Como convertir una PC en un completo servidor
Como convertir una  PC en un completo servidorComo convertir una  PC en un completo servidor
Como convertir una PC en un completo servidorrcc1964
 
Manual de lenguaje C++
Manual de lenguaje C++Manual de lenguaje C++
Manual de lenguaje C++rcc1964
 
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarelly
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.BucarellyLibro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarelly
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarellyrcc1964
 

Mehr von rcc1964 (12)

Backmasking
BackmaskingBackmasking
Backmasking
 
Hermetismo
HermetismoHermetismo
Hermetismo
 
questoes de info2005 e2006.PDF
questoes de info2005 e2006.PDFquestoes de info2005 e2006.PDF
questoes de info2005 e2006.PDF
 
introduccion_ajax
introduccion_ajaxintroduccion_ajax
introduccion_ajax
 
Tutorial Redes Completo
Tutorial Redes CompletoTutorial Redes Completo
Tutorial Redes Completo
 
COLD FUSION TUTORIAL
COLD FUSION TUTORIALCOLD FUSION TUTORIAL
COLD FUSION TUTORIAL
 
Aprenda Java como si estuviera en primero (2000)
Aprenda Java como si estuviera en primero (2000)Aprenda Java como si estuviera en primero (2000)
Aprenda Java como si estuviera en primero (2000)
 
Curso de lenguaje C
Curso de lenguaje CCurso de lenguaje C
Curso de lenguaje C
 
La cara oculta de C++ Builder
La cara oculta de C++ BuilderLa cara oculta de C++ Builder
La cara oculta de C++ Builder
 
Como convertir una PC en un completo servidor
Como convertir una  PC en un completo servidorComo convertir una  PC en un completo servidor
Como convertir una PC en un completo servidor
 
Manual de lenguaje C++
Manual de lenguaje C++Manual de lenguaje C++
Manual de lenguaje C++
 
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarelly
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.BucarellyLibro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarelly
Libro.de.ORO.de.Visual.Basic.6.0.Orientado.a.Bases.de.Datos.-.2da.Ed.Bucarelly
 

Kürzlich hochgeladen

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 

Kürzlich hochgeladen (20)

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 

javscript

  • 1. JAVASCRIPT TO NON PROGRAMMERS JAVASCRIPT Webteacher Software now offers Welcome To JavaScript for the Total Non- Programmer This tutorial will take you step by step through the fundamentals of Javascript. You will learn how to write functions, use data from text boxes, create IF-THEN conditionals, program loops, and generally make your web page "smarter." I teach computer classes for a living to corporate clients of all levels. After 2 years of teaching, I have learned a lot about communication between people of various levels of computer experience.
  • 2. This tutorial assumes that you have no prior programming experience, but that you have created your own HTML pages. If you find this tutorial helpful, please let me know (it's my only reward). Also, links are graciously accepted. What is JavaScript? Javascript is an easy-to-use programming language that can be embedded in the header of your web pages. It can enhance the dynamics and interactive features of your page by allowing you to perform calculations, check forms, write interactive games, add special effects, customize graphics selections, create security passwords and more. What's the difference between JavaScript and Java?
  • 3. Actually, the 2 languages have almost nothing in common except for the name. Although Java is technically an interpreted programming language, it is coded in a similar fashion to C++, with separate header and class files, compiled together prior to execution. It is powerful enough to write major applications and insert them in a web page as a special object called an "applet." Java has been generating a lot of excitment because of its unique ability to run the same program on IBM, Mac, and Unix computers. Java is not considered an easy-to-use language for non-programmers. Javascript is much simpler to use than Java. With Javascript, if I want check a form for errors, I just type an if-then statement at the top of my page. No compiling, no applets, just a simple sequence.
  • 4. What is Object Oriented Programming? Everyone that wants to program JavaScript should at least try reading the following section. If you have trouble understanding it, don't worry. The best way to learn JavaScript is from the examples presented in this tutorial. After you have been through the lessons, come back to this page and read it again. OOP is a programming technique (note: not a language structure - you don't even need an object-oriented language to program in an object-oriented fashion) designed to simplify complicated programming concepts. In essence, object-oriented programming revolves around the idea of user- and system-defined chunks of data, and controlled means of accessing and modifying those chunks.
  • 5. Object-oriented programming consists of Objects, Methods and Properties. An object is basically a black box which stores some information. It may have a way for you to read that information and a way for you to write to, or change, that information. It may also have other less obvious ways of interacting with the information. Some of the information in the object may actually be directly accessible; other information may require you to use a method to access it - perhaps because the way the information is stored internally is of no use to you, or because only certain things can be written into that information space and the object needs to check that you're not going outside those limits. The directly accessible bits of information in the object are its properties. The difference between data
  • 6. accessed via properties and data accessed via methods is that with properties, you see exactly what you're doing to the object; with methods, unless you created the object yourself, you just see the effects of what you're doing. Other Javascript pages you read will probably refer frequently to objects, events, methods, and properties. This tutorial will teach by example, without focusing too heavily on OOP vocabulary. However, you will need a basic understanding of these terms to use other JavaScript references. Objects and Properties Your web page document is an object. Any table, form, button, image, or link on your page is also an object. Each object has certain properties (information about the object). For
  • 7. example, the background color of your document is written document.bgcolor. You would change the color of your page to red by writing the line: document.bgcolor="red" The contents (or value) of a textbox named "password" in a form named "entryform" is document.entryform.password.value . Methods Most objects have a certain collection of things that they can do. Different objects can do different things, just as a door can open and close, while a light can turn on and off. A new document is opened with the method document.open() You can write "Hello World" into a document by typing document.write("Hello World") .
  • 8. open() and write() are both methods of the object: document. Events Events are how we trigger our functions to run. The easiest example is a button, whose definition includes the words onClick="run_my_function()". The onClick event, as its name implies, will run the function when the user clicks on the button. Other events include OnMouseOver, OnMouseOut, OnFocus, OnBlur, OnLoad, and OnUnload. Webt Chap This i box w
  • 12. to ke This i sectio <HTM <HE <SCR < !-- (all o // - E </SC </HE Webt You c
  • 13. to na Kalam A fun funct (stuff This a variab variab The v The c funct
  • 14. The a a piec Alert( Alert( and w "Hello put th Some Alert( then <HTM <HE < !-- funct alert // - E </SC </HE
  • 15. Webt The F used JavaS objec All fo </FO The t The N which TYPE butto For e <INP The b funct
  • 16. and O The N JavaS The V The O the n For e <INP onClic <BOD <FOR <INP <INP onClic </FO </BO </HT We e
  • 17. onClic This m progr the p text1 huh? OK, t butto name numb form. typed If this you e onCli funct That' funct comm all to