Be a groovy man by positive thinking

Ui/UX_019(자바스크립트 평가) 본문

IT/_HTML_CSS_JS

Ui/UX_019(자바스크립트 평가)

KhanSelf 2017. 8. 2. 14:47

1. Inside which HTML element do we put the JavaScript?

 

<js> <scripting> <script> <javascript>

 

2. What is the correct JavaScript syntax to change the content of the HTML element below?

 

<p id="demo">This is a demonstration.</p>

 

#demo.innerHTML = "Hello World!";

document.getElementByName("p").innerHTML = "Hello World!";

document.getElementById("demo").innerHTML = "Hello World!";

document.getElement("p").innerHTML = "Hello World!";

 

3. Where is the correct place to insert a JavaScript?

 

Both the <head> section and the <body> section are correct

The <head> section The <body> section

 

4. What is the correct syntax for referring to an external script called "xxx.js"?

 

<script src="xxx.js"> <script href="xxx.js"> <script name="xxx.js">

 

5. The external JavaScript file must contain the <script> tag.

 

True False

 

6. How do you write "Hello World" in an alert box?

 

msgBox("Hello World"); alertBox("Hello World");

alert("Hello World"); msg("Hello World");

 

7. How do you create a function in JavaScript?

 

function:myFunction() function myFunction() function = myFunction()

 

8. How do you call a function named "myFunction"?

 

call myFunction() myFunction() call function myFunction()

 

9. How do you find the number with the highest value of x and y?

 

Math.max(x, y) Math.ceil(x, y) ceil(x, y) top(x, y)

 

 

10. What is the correct JavaScript syntax for opening a new window called "w2" ?

 

w2 = window.link("http://www.test.com"); w2 = window.new("http://www.test.com");

w2 = window.open("http://www.test.com"); w2 = window.reload("http://www.test.com");

 

 

11. What is the correct JavaScript syntax to change the style of the HTML?

 

document.getElementById("test").style.font-size = "20px";

document.getElementById("test").style.font.size = "20px";

document.getElementById("test").style.fontSize = "20px";

document.getElementById("test").style.font = "20px";

 

 

12. Change the correct syntax to acess parents window the HERE

 

function changeParents() {

HERE.document.getElementById("test").value = "홍길동";

}

 

 

self opener parents top

 

13. What will the following code result?

 

var str = "javascript";

var str2 = str.substring(1,3);

var str3 = str.substr(7,3);

document.write(str2+" - ");

document.write(str3);

 

jav - ipt jav - rip av - ript av - ipt

 

 

14. How do you round the number 7.25, to the nearest integer?

 

Math.round(7.25) rnd(7.25) Math.rnd(7.25) round(7.25)

 

 

15. What is the correct way to write a JavaScript array?

 

var colors = (1:"red", 2:"green", 3:"blue")

var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")

var colors = "red", "green", "blue"

var colors = ["red", "green", "blue"]
















1. ③

2. ③

3. ①

4. ①

5. ②

6. ③

7. ②

8. ②

9. ①

10. ③

11. ③

12. ②

13. ④

14. ①

15. ④

'IT > _HTML_CSS_JS' 카테고리의 다른 글

UI/UX_021  (0) 2017.08.07
UI/UX_020(JQuery)  (0) 2017.08.03
UI/UX_018  (0) 2017.08.02
UI/UX_017  (0) 2017.07.31
UI/UX_016  (0) 2017.07.28