SlideShare une entreprise Scribd logo
1  sur  6
Javascript * JavaScript is the most popular scripting language on the internet, and  works in all major browsers, such as Internet Explorer, Firefox,  Chrome, Opera, and Safari. * JavaScript was designed to add interactivity to HTML pages * A scripting language is a lightweight programming language * JavaScript is usually embedded directly into HTML pages * JavaScript is an interpreted language (means that scripts execute  without preliminary compilation)
Uses *  JavaScript gives HTML designers a programming tool.  * JavaScript can put dynamic text into an HTML page.  * JavaScript can react to events.  * JavaScript can read and write HTML elements.  * JavaScript can be used to validate data.  * JavaScript can be used to detect the visitor's browser.  * JavaScript can be used to create cookies.
Javascript Statements * Javascript is a sequence of statements to be executed by the browser. * A JavaScript statement is a command to a browser. The purpose of the  command is to tell the browser what to do. * This JavaScript statement tells the browser to write "Hello Dolly" to the  web page: document.write("Hello Dolly");
HTML tags in javascript The example below shows how to add HTML tags to the JavaScript: <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;<h1>Hello World!</h1>&quot;); </script> </body> </html>  The  document.write  command is a standard JavaScript command for writing output to a page.
Javascript Comments Comments can be added to explain the JavaScript, or to make the code more readable. Example for comments: <script type=&quot;text/javascript&quot;> // Write a heading document.write(&quot;<h1>This is a heading</h1>&quot;); // Write two paragraphs: document.write(&quot;<p>This is a paragraph.</p>&quot;); document.write(&quot;<p>This is another paragraph.</p>&quot;); </script>
Advantages * Advantages include Cross-browser support, validating data on the  client, and being able to create more sophisticated user interfaces. * JavaScript is an excellent solution to implement when validating input  forms on the client side. * This means that if a user forgets to enter his name in a form for  instance a JavaScript validation function can popup a message to let  him know about the omission. * JavaScript effects are also much faster to download than some other  front-end technologies like Flash and Java applets.

Contenu connexe

Tendances

Agile Development With Hobo
Agile Development With HoboAgile Development With Hobo
Agile Development With HoboEvarist Lobo
 
1.1 xhtml basics
1.1 xhtml basics1.1 xhtml basics
1.1 xhtml basicsBulldogs83
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScriptNeil Ghosh
 
Html guide
Html guideHtml guide
Html guideDileysi
 
Introduction to HAML
Introduction to HAMLIntroduction to HAML
Introduction to HAMLJon Dean
 
Java script writing javascript
Java script writing javascriptJava script writing javascript
Java script writing javascriptJesus Obenita Jr.
 
Different examples of jsp codes
Different examples of jsp codesDifferent examples of jsp codes
Different examples of jsp codeskarenm30
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for DesignersMatthew Turland
 
Privilege Escalation And Misconfigurations Part2
Privilege Escalation And Misconfigurations Part2Privilege Escalation And Misconfigurations Part2
Privilege Escalation And Misconfigurations Part2Caleb Sima
 
A Web Developer's Journey across different versions of ASP.NET
A Web Developer's Journey across different versions of ASP.NETA Web Developer's Journey across different versions of ASP.NET
A Web Developer's Journey across different versions of ASP.NETHarish Ranganathan
 

Tendances (18)

Agile Development With Hobo
Agile Development With HoboAgile Development With Hobo
Agile Development With Hobo
 
JSP custom tags
JSP custom tagsJSP custom tags
JSP custom tags
 
Java script
Java scriptJava script
Java script
 
1.1 xhtml basics
1.1 xhtml basics1.1 xhtml basics
1.1 xhtml basics
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScript
 
Html guide
Html guideHtml guide
Html guide
 
Introduction to HAML
Introduction to HAMLIntroduction to HAML
Introduction to HAML
 
Java script writing javascript
Java script writing javascriptJava script writing javascript
Java script writing javascript
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Javascript
JavascriptJavascript
Javascript
 
Different examples of jsp codes
Different examples of jsp codesDifferent examples of jsp codes
Different examples of jsp codes
 
Java script
Java scriptJava script
Java script
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
Java scripts
Java scriptsJava scripts
Java scripts
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for Designers
 
Privilege Escalation And Misconfigurations Part2
Privilege Escalation And Misconfigurations Part2Privilege Escalation And Misconfigurations Part2
Privilege Escalation And Misconfigurations Part2
 
A Web Developer's Journey across different versions of ASP.NET
A Web Developer's Journey across different versions of ASP.NETA Web Developer's Journey across different versions of ASP.NET
A Web Developer's Journey across different versions of ASP.NET
 
Front-End Tooling
Front-End ToolingFront-End Tooling
Front-End Tooling
 

En vedette (6)

Mysql
MysqlMysql
Mysql
 
Ajax
Ajax Ajax
Ajax
 
User security
User securityUser security
User security
 
Css
CssCss
Css
 
Ajax
AjaxAjax
Ajax
 
Predicting churn in telco industry: machine learning approach - Marko Mitić
 Predicting churn in telco industry: machine learning approach - Marko Mitić Predicting churn in telco industry: machine learning approach - Marko Mitić
Predicting churn in telco industry: machine learning approach - Marko Mitić
 

Similaire à Javascript

Javascript
JavascriptJavascript
JavascriptSushma M
 
Javascript survival for CSBN Sophomores
Javascript survival for CSBN SophomoresJavascript survival for CSBN Sophomores
Javascript survival for CSBN SophomoresAndy de Vera
 
JavaScript Missing Manual, Ch. 1
JavaScript Missing Manual, Ch. 1JavaScript Missing Manual, Ch. 1
JavaScript Missing Manual, Ch. 1Gene Babon
 
Css,javascript,php,mysql
Css,javascript,php,mysqlCss,javascript,php,mysql
Css,javascript,php,mysqlvurimi prasad
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academyactanimation
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJonnJorellPunto
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPTGo4Guru
 
JSP diana y yo
JSP diana y yoJSP diana y yo
JSP diana y yomichael
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA scriptumardanjumamaiwada
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java scriptnanjil1984
 
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
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorialtutorialsruby
 

Similaire à Javascript (20)

Javascript
JavascriptJavascript
Javascript
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
 
Javascript survival for CSBN Sophomores
Javascript survival for CSBN SophomoresJavascript survival for CSBN Sophomores
Javascript survival for CSBN Sophomores
 
JavaScript Missing Manual, Ch. 1
JavaScript Missing Manual, Ch. 1JavaScript Missing Manual, Ch. 1
JavaScript Missing Manual, Ch. 1
 
Css,javascript,php,mysql
Css,javascript,php,mysqlCss,javascript,php,mysql
Css,javascript,php,mysql
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
 
Class2
Class2Class2
Class2
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
Javascript
JavascriptJavascript
Javascript
 
HTML
HTMLHTML
HTML
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Html
HtmlHtml
Html
 
JSP diana y yo
JSP diana y yoJSP diana y yo
JSP diana y yo
 
Before start
Before startBefore start
Before start
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
 
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>
 
Essential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_TutorialEssential_Javascript_--_A_Javascript_Tutorial
Essential_Javascript_--_A_Javascript_Tutorial
 

Javascript

  • 1. Javascript * JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. * JavaScript was designed to add interactivity to HTML pages * A scripting language is a lightweight programming language * JavaScript is usually embedded directly into HTML pages * JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
  • 2. Uses * JavaScript gives HTML designers a programming tool. * JavaScript can put dynamic text into an HTML page. * JavaScript can react to events. * JavaScript can read and write HTML elements. * JavaScript can be used to validate data. * JavaScript can be used to detect the visitor's browser. * JavaScript can be used to create cookies.
  • 3. Javascript Statements * Javascript is a sequence of statements to be executed by the browser. * A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do. * This JavaScript statement tells the browser to write &quot;Hello Dolly&quot; to the web page: document.write(&quot;Hello Dolly&quot;);
  • 4. HTML tags in javascript The example below shows how to add HTML tags to the JavaScript: <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;<h1>Hello World!</h1>&quot;); </script> </body> </html> The document.write command is a standard JavaScript command for writing output to a page.
  • 5. Javascript Comments Comments can be added to explain the JavaScript, or to make the code more readable. Example for comments: <script type=&quot;text/javascript&quot;> // Write a heading document.write(&quot;<h1>This is a heading</h1>&quot;); // Write two paragraphs: document.write(&quot;<p>This is a paragraph.</p>&quot;); document.write(&quot;<p>This is another paragraph.</p>&quot;); </script>
  • 6. Advantages * Advantages include Cross-browser support, validating data on the client, and being able to create more sophisticated user interfaces. * JavaScript is an excellent solution to implement when validating input forms on the client side. * This means that if a user forgets to enter his name in a form for instance a JavaScript validation function can popup a message to let him know about the omission. * JavaScript effects are also much faster to download than some other front-end technologies like Flash and Java applets.