JavaScript
Saturday, 7 March 2015
Wednesday, 4 March 2015
Tuesday, 3 March 2015
Javascript Code: Display Date
Today I am going to explain very simple code that displays current date by clicking a button.
For someone who starts his adventure with Javascript it might sound complicated , but don't worry it is much simpler than it looks like.
To write that kind of code user must be familiar with usage of if else statement.
In JavaScript we have the following conditional statements:
To write Display Date code we need to open Notepad++ and write following code:
This code opens html website on which we can add interactive content.
This Javascript code is based on IF ELSE statement which check todays date and returns date assigned to number.
After Clicking button" TRY IT " The Date in new paragraph will be displayed.
For someone who starts his adventure with Javascript it might sound complicated , but don't worry it is much simpler than it looks like.
To write that kind of code user must be familiar with usage of if else statement.
In JavaScript we have the following conditional statements:
- We use if to specify a block of code to be executed, if a specified condition is true
- Use else to specify a block of code to be executed, if the same condition is false
- Use else if to specify a new condition to test, if the first condition is false
To write Display Date code we need to open Notepad++ and write following code:
After Clicking button" TRY IT " The Date in new paragraph will be displayed.
Sunday, 1 March 2015
Video Tutorial about Alert box
Very simple video tutorial about interesting javascript function called Alert Box
Friday, 27 February 2015
Little bit about jQuery
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML. Used by over 60% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today. JQuery is free, open-source software licensed under the MIT License.
jQuery's syntax is designed to make it easier to navigate a document, select DOM(Document Object Model) elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.
Here is a little example how simple and short jQuery is comparing it to JavaScript Code.
jQuery
$ (‘body’) .css (‘background’, ‘#ccc’);
JavaScript
Function changeBachground(color) {
Document.body.style.background = color;
}
Sunday, 22 February 2015
Simple video tutorial about Introducting to JavaScript
This video tutorial show the basic of JavaScript Language.
Friday, 20 February 2015
JavaScript Comparison operators and Logical Operators
Comparison operators
Comparison operators are used in logical statements to determine equality or difference between variables or values.
Logical operators
Logical operators are used to determine the logic between variables or values.
Bitwise Operators
Bit operators work on 32 bits numbers.Any numeric operand in the operation is converted into a 32 bit number.
The result is converted back to a JavaScript number.
Tuesday, 17 February 2015
Notepad ++ and First Script !!
To write our first script in JavaScript language we need to download specific software which allows us to write a lines of code. One of the best software for begginers is Notepad++ you can download it from here http://notepad-plus-plus.org/
Here are easy steps to download it.
Go to Notepad++ website
Here are easy steps to download it.
Go to Notepad++ website
When you enter the website find Download button and click on it!
After that a downloading window appear.
After installation process open notepad and click on File and New.
And You can write your first script.
<html>
<head>
<title>This is a JavaScript example</title>
<script language="JavaScript">
<!--
document.write("Hello World!");
//-->
</script>
</head>
<body> Hi user</body>
</html>
<head>
<title>This is a JavaScript example</title>
<script language="JavaScript">
<!--
document.write("Hello World!");
//-->
</script>
</head>
<body> Hi user</body>
</html>
When you want to save your script go to "FILE" and SAVE AS.
In SAVE AS TYPE select HYPER TEXT MARKUP LANGUAGE FILE(html).
If you want to run your first website script to see what you done just go to "RUN" and Launch in FireFox or Chrome.
Monday, 16 February 2015
JavaScript or Java?
JavaScript is A scripting language developed by Netscape to enable Web authors to design interactive sites. Although it shares many of the features and structures of the full Java language, it was developed independently. Javascript can interact with HTML source code, enabling Web authors to spice up their sites with dynamic content. JavaScript is endorsed by a number of software companies and is an open language that anyone can use without purchasing a license. It is supported by recent browsers from Netscape and Microsoft, though Internet Explorer supports only a subset, which Microsoft calls Jscript .
Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed to have the "look and feel" of the C++ language, but it is simpler to use than C++ and enforces an object-oriented programming model. Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network. It can also be used to build a small application module or applet for use as part of a Web page. Applets make it possible for a Web page user to interact with the page.
Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed to have the "look and feel" of the C++ language, but it is simpler to use than C++ and enforces an object-oriented programming model. Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network. It can also be used to build a small application module or applet for use as part of a Web page. Applets make it possible for a Web page user to interact with the page.
Wednesday, 11 February 2015
Good resources to start with Java Script
Here are some good resources to start your adventure with JavaScript :)
Subscribe to:
Posts (Atom)