• Nie Znaleziono Wyników

highlighting feature such as Notepad++

N/A
N/A
Protected

Academic year: 2021

Share "highlighting feature such as Notepad++"

Copied!
6
0
0

Pełen tekst

(1)

JavaScript – part II

Maciej Grzenda, PhD

Warsaw University of Technology

Faculty of Mathematics and Information Science M.Grzenda@mini.pw.edu.pl

http://www.mini.pw.edu.pl/~grzendam

(2)

HTML/CSS/JS tasks

• In this task and all the other

HTML/CSS/JavaScript tasks use any text editor you prefer, if possible with syntax highlighting feature such as Notepad++

highlighting feature such as Notepad++

• Verify whether your document is compliant with HTML standard and fix errors, if

necessary

(3)

Task 1 – simple animation

Run and investigate lab_6_task_1 example.

Style settings (here: location of a DIV) are modified

a DIV) are modified

These changes are applied in a time-based loop

This code is started when a document is opened

(4)

Task 2: a simple game

• Develop a game:

– Several green and red buttons move on the screen in different locations and directions

– When a user clicks on green button: +5 points are given – When a user clicks on red button: -10 points are given – The result is displayed constantly on the screen

– After 20 points are collected, the number of red buttons is increased and they move faster

– Detect browser window size automatically in your code – Feel free to add your own functionality extending this

solution

(5)

Task 3: photo animation

• The browser window is divided into two boxes: upper one and lower one

• In the upper part:

– In a time-based loop several photos are displayed (one at a time)

time)

– When a user clicks one of them it is:

• First resized to the size of the browser window for ca. 2 seconds,

• next it is added to a vector of images in the lower part and is no longer displayed in the upper part of the window

• The lower part of the screen contains a vector that is

gradually filled with the selected photos. The vector

has 5 cells. If there are more than 5 photos selected,

(6)

Task 3: discussion

• Use onClick event to select a picture

• Use either a table-based or DIV-based layout to position pictures on the screen

• Use JavaScript Array objects (see

www.w3schools.com for details) to keep

picture names for both sections of the screen

Cytaty

Powiązane dokumenty

homogeneous groups, L p -multipliers, Fourier transform, sym- bolic calculus, H¨ ormander metrics, singular integrals, flag kernels, Littlewood-Paley

• Display links to commercial web sites with 3 times smaller font size than the links to non-commercial ones7. • Display the names of the authors

It is important to note here that JavaScript libraries such as jQuery or prototype use regular JavaScript and DOM methods in the background. An important advantage of such libraries

It is demonstrated by Rukhin (1993) that in the bounded likelihood ratio situation the probability of the correct decision is bounded from above by an explicitly given constant,

Some generalizations of the Riemann theorem about the set of limit points of the partial sums of rearrangements of a given conditionally convergent series are also studied..

In this paper we will discuss the CLUR points in Orlicz sequence spaces equipped with the Orlicz norm and in Orlicz function spaces equipped with both the Luxemburg and Orlicz norm..

Indeed, in this case every non-empty open subset of X is uncountable (see [3], Proposition 1.29) and thus X=X c ; further, second-countable spaces are Fr´ echet and hereditarily

Port A is defined to be the origin of a set of coordinate axes and port B is located at the point (70, 30), where distances are measured