Implementation JavaScript Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is ‘client-side’ scripting?

A

Client-side scripts are sections of code that are interpreted by the browser and executed on the client system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give a possible use for client-side scripting.

A
  • To make web pages change once arriving at the browser.

- To validate data entered into a form by a client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the primary use for JavaScript?

A

Changing the way a website interacts with a user as they navigate the site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

function mouseOver() {

document.getElementById(“demo”).style.color = “red”;
}

What will this code achieve once applied?

A

This function will change the style of an element to red when the mouse hovers over it, if the ID of that element is ‘demo’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What tags must be used to implement JavaScript code, and where should they be located?

A

The ‘script’ tags must be used, and they function within the ‘head’ section.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a mouseOut() function?

A

A function used to change something, once the user removes their pointer from over it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What action would trigger a mouseOver() event?

A

The user hovering over an element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
function zoomIn() {
    		document.getElementById("question7").style.height="150px";
    		document.getElementById("question7").style.width="150px";
}

This function causes an image with the ID ‘question 7’ to change when hovered over. Using reference to the code above, how will the image change when this event takes place?

A
  • It will change to a size of 150/150 px.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What kind of system interprets and runs client-side scripts?

A

Browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What use do IDs have in JavaScript code?

A

They allow you to select certain parts of a website to interact with.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly