Welcome! If you like our Blog so please Follow this blog and also +1 this blog here---->
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, 18 September 2012

Javascript Tutorial 5: JavaScript Popup Boxes and Throw Statement (Last)

0 Comments
JavaScript Popup Boxes JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box. Alert Box An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click "OK" to proceed. Syntax alert("sometext"); Example <!DOCTYPE html><html><head><script>function myFunction(){alert("I am an alert box!");}</script></head><body><input...[Readmore]

Monday, 17 September 2012

Javascript Tutorial 5: JavaScript Data Types and Objects

0 Comments
JavaScript Data Types String, Number, Boolean, Array, Object, Null, Undefined. JavaScript Strings A string is a variable which stores a series of characters like "John Doe". A string can be any text inside quotes. You can use simple or double quotes: Example var carname="Volvo XC60";var carname='Volvo XC60'; You can use quotes inside a string, as long as they don't match the quotes surrounding the string: Example var answer="It's...[Readmore]

Javascript Tutorial 4: JavaScript Variables and Functions

0 Comments
JavaScript Variables Variables are "containers" for storing information: JavaScript Data Types var answer1="He is called 'Johnny'";var answer2='He is called "Johnny"';var pi=3.14;var x=123;var y=123e5;var z=123e-5; var cars=new Array("Saab","Volvo","BMW"); var person={firstname:"John", lastname:"Doe", id:5566}; Like School Algebra Remember algebra from school? x=5y=6z=x+y Do you remember that letters (like x) can be used to hold a value...[Readmore]

Javascript Tutorial 3: JavaScript Statement and Comments

0 Comments
JavaScript Statement JavaScript is a sequence of statements to be executed by the browser. JavaScript Statements JavaScript statements are "commands" to the browser. The purpose of the statements is to tell the browser what to do. This JavaScript statement tells the browser to write "Hello Dolly" inside an HTML element with id="demo": document.getElementById("demo").innerHTML="Hello Dolly"; Semicolon ; Semicolon separates JavaScript...[Readmore]

Sunday, 16 September 2012

Javascript Tutorial 2: JavaScript How To and Where To

0 Comments
How To A JavaScript is surrounded by a <script> and </script> tag. JavaScript is typically used to manipulate HTML elements. The <script> Tag To insert a JavaScript into an HTML page, use the <script> tag. The <script> and </script> tells where the JavaScript starts and ends. The lines between the <script> and </script> contain the JavaScript: <script>alert("My First JavaScript");</script> You...[Readmore]