Saltar apartados

Arrays (Ejercicios)

Aim:
Create a programilla that help to apreder the days of the week in another language.

PART 1:
It creates an array with the names of the days of the week. It creates a div by each day with a compound class by 2 names: “free unseen”.

  • Free will have the properties that your want to.
  • Unseen only will have like property “visibility: hidden;”


Of this way that do not see nothing but arrancar the page.

div Go=”January” class=”unseen_free style” >Monday




It creates an input of text.

If the user writes a day of correct form, this light with the function ($ serve to take the label html with go written between paréntesis).

$(“dia_Writing”).removeClass(“Unseen”)


If there is not tarpaulin write (alert) error.

If there is tarpaulin, delete the day of the array dias of the week and put it in the array of tarpaulins.

When they are all hit paints an orderly vector as it was hitting.


PART 2:
It creates another array with the days of the week in English
var ing = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday","sunday"];

It creates another array asociativo of the type translates[“Monday”] = “Monday”

It modifies the previous exercise so that when it write “Monday” it light “Monday”.

Al complete the week has to appear the order of the days of the week in English as I was them hitting.

Download PDF

Computing service Mootools


Universidad de Alicante
Carretera de San Vicente del Raspeig s/n
03690 San Vicente del Raspeig
Alicante (Spain)

Tel: (+34) 96 590 3400

Fax: (+34) 96 590 3464

For further information: informacio@ua.es, and for enquiries on this web server: webmaster@ua.es

Carretera San Vicente del Raspeig s/n - 03690 San Vicente del Raspeig - Alicante - Tel. 96 590 3400 - Fax 96 590 3464