1 / 18

Delivered By: Shubham Shrivastava .

Web Designing. Advisor : Department Of CSE/IT (SOP). Delivered By: Shubham Shrivastava. Introduction. 1. Basics syntax. 2. Events. 3. Form Validation. 4. Javascript. JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language

Download Presentation

Delivered By: Shubham Shrivastava .

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Designing Advisor : Department Of CSE/IT (SOP). Delivered By: ShubhamShrivastava.

  2. Introduction 1 Basics syntax 2 Events 3 Form Validation 4 Javascript

  3. JavaScript was designed to add interactivity to HTML pages • JavaScript is a scripting language • 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). • Everyone can use JavaScript without purchasing a license. iNTRODUCtion

  4. JavaScript gives HTML designers a programming tool JavaScript can put dynamic text into an HTML page. JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element What can a JavaScript do?

  5. <html><body><h1>My First Web Page</h1><script type="text/javascript">document.write("<p>" + Date() + "</p>");</script></body></html> Using Javascript in html pages

  6. <html><head><script type="text/javascript" src="xxx.js"></script></head><body></body></html> Using an External JavaScript

  7. JavaScript can also be placed in external files. External JavaScript files often contains code to be used on several different web pages. External JavaScript files have the file extension .js

  8. <html> <body> <p>paragraph 1</p> <script type="text/javascript"> document.bgColor="blue"; alert("first script block"); </script> <p>paragraph 2</p> <script type="text/javascript"> document.bgColor="red"; alert("second script block"); An example using different scripts in page

  9. </script> <p>paragraph 3</p> <script type="text/javascript"> document.bgColor="green"; alert("third script block"); </script> </body> </html> A html page

  10. Document.write:For printing some text on the page. All html tags can also be used in this case. Document.bgColor:which changes the color of the page. Alert:which display a message box. Prompt:which ask the user to input some value. Confirm:it ask the user for confirming the values input. There are various inbuild functions ued in javascript

  11. Numeric data Text data Boolean data Types of Data in Javascript

  12. A variable can have a short name, like x, or a more descriptive name, like carname. Rules for JavaScript variable names: Variable names are case sensitive (y and Y are two different variables) Variable names must begin with a letter or the underscore character Variables in Javascript

  13. + Addition - Subtraction * Multiplication / Division % Modulus ++ Increment -- Decrement Operators in Javascript

  14. <html> <head> <script type="text/javascript" src="jjj.js"></script> </head> <body> <p>here is the javascript used</p> </body> </html>

  15. var a=prompt("enter the temperature in degree farenheit"); var b; b=5/9*(a-32) alert(b); document.write(b); External Javascript

  16. onSubmit(); onChange(); onBlur(); onSelect(); Events in javascript Form

  17. We can validate our form by keeping this objective: • That any textbox not left blank • When user submit the form the alert box shows your message is recorded. Form Validation

  18. We have done with javascript Thank You

More Related