Archive for the ‘JavaScript‘ Category

Moving Image Inside HTML page: Javascript ( A Small Fun Application )

Write a xHTML program to take input from the user and move the image to the corresponding location(position), using Javascript. Note: ( CSS – Cascading StyleSheet ) Static Positioning does not have top and left properties, so an image which is positioned as Static can’t be moved. Absolute positioning: The image moves to the new [...]

Event Object: Javascript

“Browser throws object automatically whenever an event occurs.” This is true with most browsers, except Microsoft’s Internet Explorer. To solve the browser incompatibility and to make our programs work the same way in all major browsers(including Internet Explorer – IE ), we need to write the coding with little smartness! What does this program do? [...]

Text Stacking: CSS & JavaScript

Develop and demonstrate, using Javascript, a xHTML document that contains three short paragraphs of text, stacked on top of each other, with only enough of each showing so that the mouse cursor can be placed over some part of them. When the cursor is placed over the exposed part of any paragraph, it should rise [...]

Find Position of Left most Vowel: JavaScript

Develop and demonstrate a xhtml file which uses javascript program to find the first occurrence or the left most vowel in the user entered string. Input: A String. Output: Position of the left most or first occurrence of the vowel in the user entered string. Video Explaining The JavaScript Code: YouTube Link: http://www.youtube.com/watch?v=ni3diSb5Y40 [Watch the [...]

Roots of Quadratic Equation: JavaScript

Quadratic Equations are of the form ax2 + bx + c = 0. To find roots(root1 and root2) of such an equation, we need to use the formula Video Explaining The JavaScript Code To Find Roots of a Quadratic Equation: YouTube Link: http://www.youtube.com/watch?v=Td6QViKdbZU [Watch the Video In Full Screen.] To calculate the roots of a [...]

Generating Fibonacci Series using JavaScript

Today lets see how to generate Fibonacci Series using JavaScript programming. First Thing First: What Is Fibonacci Series ?Fibonacci Series is a series of numbers where the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two. Its recurrence relation is given by Fn = Fn-1 [...]