Learning Javascript easily

Published on by Yousfi Benameur

 
JavaScript is a high-level, dynamic, untyped, and interpreted programming language.It has been standardized in the ECMAScript language specification.Alongside HTML and CSS, it is one of the three essential technologies of World Wide Web content production; 
the majority of websites employ it and it is supported by all modern web browsers without  plug-ins.
JavaScript is prototype-based with first-class functions, making it a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.
It has an API for working with text, arrays, dates and regular expressions, but does not include any I/O, such as  networking, storage, or graphics facilities, relying for these upon the host environment in which  it is embedded.

Despite some naming, syntactic, and standard library similarities, JavaScript and Java are  otherwise unrelated and have very different semantics. The syntax of JavaScript is actually derived  from C, while the semantics and design are influenced by the Self and Scheme programming languages.

JavaScript is also used in environments that are not web-based, such as PDF documents, site-specific browsers, and desktop widgets. Newer and faster JavaScript virtual machines (VMs)  and platforms built upon them have also increased the popularity of JavaScript for server-side 
web applications. On the client side, JavaScript has been traditionally implemented as an interpreted language, but more recent browsers perform just-in-time compilation. 
It is also used in game development, the creation of desktop and mobile applications, and server-side network programming with runtime environments such as Node.js.
[wikipedia]

this is a variety of tutorials to learn easily javascript , all on a vfp top level form.
All tutos link to the web site http://www.w3schools.com.i found this site very usefull ,and can learn succinctly javascript from here.
VFP can traverse web easily with the javascript support as an overlapper to build web pages.
from the Tiobe index (01/2016) Jvascript is the 8th worldwide language programming (visual foxpro is 43th despite its stopped on 2007).

*Important:*the code above is tested on visual foxpro 9 sp2-under windows 10 pro.The vfp IE browser is an IE11 emulation.

Click on code to select [then copy] -click outside to deselect


*a complet W3Schools Javascript tutorial n a vfp form

Publi yform
yform=Newobject("ytuto")
yform.Show
Read Events
Retu
*
Define Class ytuto As Form
Height = 612
Width = 962
ShowWindow = 2
AutoCenter = .T.
Caption = " W3Schools Javascript tutoriels"
BackColor = Rgb(212,208,200)
Name = "Form1"

Add Object olecontrol1 As OleControl With ;
    oleclass="shell.explorer.2", ;
	Top = -1, ;
	Left = 0, ;
	Height = 613, ;
	Width = 240, ;
	Anchor = 15, ;
	Name = "Olecontrol1"

Add Object olecontrol2 As OleControl With ;
	oleclass="shell.explorer.2", ;
	Top = 1, ;
	Left = 293, ;
	Height = 611, ;
	Width = 667, ;
	Anchor = 15, ;
	Name = "Olecontrol2"

Procedure Destroy
	Clea Events
Endproc

Procedure olecontrol1.BeforeNavigate2
	*** Événement de contrôle ActiveX  ***
	Lparameters pdisp, url, Flags, targetframename, postdata, headers, Cancel
	Nodefault
	Thisform.olecontrol2.Navigate(url)
	Cancel=.T.
	Return .F.
Endproc

Procedure olecontrol1.Init
	This.silent=.T.
	Set Safe Off
	Local m.myvar
	TEXT to m.myvar noshow
	<style>
	a:link    { color: blue; }
	a:visited { color: blue; }
	</style>
	<body bgcolor=bisque oncontextmenu="return false;">
	<div>

	<center><h2 ><span >JS</span> Tutorial</h2></center>
	<a href="http://www.w3schools.com/js/default.asp" >JS HOME</a></br>
	<a href="http://www.w3schools.com/js/js_intro.asp "  >JS Introduction</a></br>
	<a href="http://www.w3schools.com/js/js_whereto.asp"  >JS Where To</a></br>
	<a href="http://www.w3schools.com/js/js_output.asp"  >JS Output</a></br>
	<a href="http://www.w3schools.com/js/js_syntax.asp"  >JS Syntax</a></br>
	<a href="http://www.w3schools.com/js/js_statements.asp"  >JS Statements</a></br>
	<a href="http://www.w3schools.com/js/js_comments.asp"  >JS Comments</a><br>
	<a href="http://www.w3schools.com/js/js_variables.asp"  >JS Variables</a><br>
	<a href="http://www.w3schools.com/js/js_operators.asp"  >JS Operators</a><br>
	<a href="http://www.w3schools.com/js/js_arithmetic.asp"  >JS Arithmetic</a><br>
	<a href="http://www.w3schools.com/js/js_assignment.asp"  >JS Assignment</a><br>
	<a href="http://www.w3schools.com/js/js_datatypes.asp"  >JS Data Types</a><br>
	<a href="http://www.w3schools.com/js/js_functions.asp"  >JS Functions</a><br>
	<a href="http://www.w3schools.com/js/js_objects.asp"  >JS Objects</a><br>
	<a href="http://www.w3schools.com/js/js_scope.asp"  >JS Scope</a><br>
	<a href="http://www.w3schools.com/js/js_events.asp"  >JS Events</a><br>
	<a href="http://www.w3schools.com/js/js_strings.asp"  >JS Strings</a><br>
	<a href="http://www.w3schools.com/js/js_string_methods.asp"  >JS String Methods</a><br>
	<a href="http://www.w3schools.com/js/js_numbers.asp"  >JS Numbers</a><br>
	<a href="http://www.w3schools.com/js/js_number_methods.asp"  >JS Number Methods</a><br>
	<a href="http://www.w3schools.com/js/js_math.asp"  >JS Math</a><br>
	<a href="http://www.w3schools.com/js/js_dates.asp"  >JS Dates</a><br>
	<a href="http://www.w3schools.com/js/js_date_formats.asp"  >JS Date Formats</a><br>
	<a href="http://www.w3schools.com/js/js_date_methods.asp"  >JS Date Methods</a><br>
	<a href="http://www.w3schools.com/js/js_arrays.asp"  >JS Arrays</a><br>
	<a href="http://www.w3schools.com/js/js_array_methods.asp"  >JS Array Methods</a><br>
	<a href="http://www.w3schools.com/js/js_booleans.asp"  >JS Booleans</a><br>
	<a href="http://www.w3schools.com/js/js_comparisons.asp"  >JS Comparisons</a><br>
	<a href="http://www.w3schools.com/js/js_if_else.asp"  >JS Conditions</a><br>
	<a href="http://www.w3schools.com/js/js_switch.asp"  >JS Switch</a><br>
	<a href="http://www.w3schools.com/js/js_loop_for.asp"  >JS Loop For</a><br>
	<a href="http://www.w3schools.com/js/js_loop_while.asp"  >JS Loop While</a><br>
	<a href="http://www.w3schools.com/js/js_break.asp"  >JS Break</a><br>
	<a href="http://www.w3schools.com/js/js_type_conversion.asp"  >JS Type Conversion</a><br>
	<a href="http://www.w3schools.com/js/js_regexp.asp"  >JS RegExp</a><br>
	<a href="http://www.w3schools.com/js/js_errors.asp"  >JS Errors</a><br>
	<a href="http://www.w3schools.com/js/js_debugging.asp"  >JS Debugging</a><br>
	<a href="http://www.w3schools.com/js/js_hoisting.asp"  >JS Hoisting</a><br>
	<a href="http://www.w3schools.com/js/js_strict.asp"  >JS Strict Mode</a><br>
	<a href="http://www.w3schools.com/js/js_conventions.asp"  >JS Style Guide</a><br>
	<a href="http://www.w3schools.com/js/js_best_practices.asp"  >JS Best Practices</a><br>
	<a href="http://www.w3schools.com/js/js_mistakes.asp"  >JS Mistakes</a><br>
	<a href="http://www.w3schools.com/js/js_performance.asp"  >JS Performance</a><br>
	<a href="http://www.w3schools.com/js/js_reserved.asp"  >JS Reserved Words</a><br>
	<a href="http://www.w3schools.com/js/js_json.asp"  >JS JSON</a><br>
	<br>

	<h2   ><span   >JS</span> Forms</h2>
	<a href="http://www.w3schools.com/js/js_validation.asp"  >Forms Validation</a>
	<a href="http://www.w3schools.com/js/js_validation_api.asp"  >Forms API</a><br>
	<br>
	<h2  ><span   >JS</span> Objects</h2>
	<a href="http://www.w3schools.com/js/js_object_definition.asp"  >Object Definitions</a><br>
	<a href="http://www.w3schools.com/js/js_properties.asp"  >Object Properties</a><br>
	<a href="http://www.w3schools.com/js/js_object_methods.asp"  >Object Methods</a><br>
	<a href="http://www.w3schools.com/js/js_object_prototypes.asp"  >Object Prototypes</a><br>
	<br>
	<h2  ><span  >JS</span> Functions</h2>
	<a href="http://www.w3schools.com/js/js_function_definition.asp"  >Function Definitions</a><br>
	<a href="http://www.w3schools.com/js/js_function_parameters.asp"  >Function Parameters</a><br>
	<a href="http://www.w3schools.com/js/js_function_invocation.asp"  >Function Invocation</a><br>
	<a href="http://www.w3schools.com/js/js_function_closures.asp"  >Function Closures</a><br>
	<br>
	<h2  ><span  >JS</span> HTML DOM</h2>
	<a href="http://www.w3schools.com/js/js_htmldom.asp"  >DOM Intro</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_methods.asp"  >DOM Methods</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_document.asp"  >DOM Document</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_elements.asp"  >DOM Elements</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_html.asp"  >DOM HTML</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_css.asp"  >DOM CSS</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_animate.asp"  >DOM Animations</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_events.asp"  >DOM Events</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_eventlistener.asp"  >DOM EventListener</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_navigation.asp"  >DOM Navigation</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_nodes.asp"  >DOM Nodes</a><br>
	<a href="http://www.w3schools.com/js/js_htmldom_nodelist.asp"  >DOM Nodelist</a><br>
	<br>
	<h2 ><span   >JS</span> Browser BOM</h2>
	<a href="http://www.w3schools.com/js/js_window.asp"  >JS Window</a><br>
	<a href="http://www.w3schools.com/js/js_window_screen.asp"  >JS Screen</a><br>
	<a href="http://www.w3schools.com/js/js_window_location.asp"  >JS Location</a><br>
	<a href="http://www.w3schools.com/js/js_window_history.asp"  >JS History</a><br>
	<a href="http://www.w3schools.com/js/js_window_navigator.asp"  >JS Navigator</a><br>
	<a href="http://www.w3schools.com/js/js_popup.asp"  >JS Popup Alert</a><br>
	<a href="http://www.w3schools.com/js/js_timing.asp"  >JS Timing</a><br>
	<a href="http://www.w3schools.com/js/js_cookies.asp"  >JS Cookies</a><br>
	<br>
	<h2  ><span  >JS</span> Examples</h2>
	<a href="http://www.w3schools.com/js/js_examples.asp"  >JS Examples</a><br>
	<a href="http://www.w3schools.com/js/js_dom_examples.asp"  >JS HTML DOM</a><br>
	<a href="http://www.w3schools.com/js/js_input_examples.asp"  >JS HTML Input</a><br>
	<a href="http://www.w3schools.com/js/js_ex_dom.asp"  >JS HTML Objects</a><br>
	<a href="http://www.w3schools.com/js/js_events_examples.asp"  >JS HTML Events</a><br>
	<a href="http://www.w3schools.com/js/js_ex_browser.asp"  >JS Browser</a><br>
	<a href="http://www.w3schools.com/js/js_quiz.asp"  >JS Quiz</a><br>
	<a href="http://www.w3schools.com/js/js_exam.asp"  >JS Certificate</a><br>
	<a href="http://www.w3schools.com/js/js_summary.asp"  >JS Summary</a><br>
	<br>
	<h2  ><span >JS</span> References</h2>
	<a href="http://www.w3schools.com/js//jsref/default.asp"  >JavaScript Objects</a><br>
	<a href="http://www.w3schools.com/js//jsref/default.asp"  >HTML DOM Objects</a><br>
	<br>
	<h2  ><span >JS</span> More apps</h2>
	<a href="http://www.w3schools.com/colors/colors_picker.asp">Color Picker</a><br>
	<a href="http://www.w3schools.com//howto/howto_google_maps.asp">Google Maps</a><br>
	<a href="http://www.w3schools.com//howto/howto_css_animate_buttons.asp">Animated Buttons</a><br>
	<a href="http://www.w3schools.com//howto/howto_css_modals.asp">Modal Boxes</a><br>
	<a href="http://www.w3schools.com//howto/howto_css_modal_images.asp">Modal Images</a><br>
	<a href="http://www.w3schools.com//howto/howto_css_tooltip.asp">Tooltips</a><br>
	<a href="http://www.w3schools.com//howto/howto_css_loader.asp">Loaders</a><br>
	<a href="http://www.w3schools.com//howto/howto_js_animate.asp">JS Animations</a><br>
	<a href="http://www.w3schools.com//howto/howto_js_progressbar.asp">Progress Bars</a><br>
	<a href="http://www.w3schools.com//howto/howto_js_dropdown.asp">Dropdowns</a><br>
	<a href="http://www.w3schools.com//howto/howto_js_accordion.asp">Accordions</a><br>
	<a href="http://www.w3schools.com//howto/howto_html_include.asp">HTML Includes</a><br>
	<a href="http://www.w3schools.com//w3css/w3css_palettes.asp">Color Palettes</a><br>
	<br>
	<h2><span >JS</span> More tutorials</h2>
	<a href="http://www.w3schools.com/html/default.asp">HTML(5) tutorial</a><br>
	<a href="http://www.w3schools.com/jsref/dom_obj_document.asp">HTML DOM</a><br>
	<a href="http://www.w3schools.com/js/js_dom_examples.asp">DOM SAMPLES</a><br>
	<a href="http://www.w3schools.com/css/default.asp">CSS tutorial</a><br>
	<a href="http://www.w3schools.com/jquery/default.asp">jQuery tutorial</a><br>
	<a href="http://www.w3schools.com/xml/default.asp">XML tutorial</a><br>
	<a href="http://www.w3schools.com/colors/colors_names.asp">HTML colors</a><br>
	<br><br>
	</div>
	ENDTEXT

	Local m.lcdest
	m.lcdest=Addbs(Sys(2023))+"ytemp.hml"
	Strtofile(m.myvar,m.lcdest)
	This.Navigate(m.lcdest)
Endproc

Procedure olecontrol2.Init
	This.silent=.T.
Endproc


Enddefine
*
*-- EndDefine: ytuto


Learning Javascript easily
To be informed of the latest articles, subscribe:
Comment on this post