Chia sẻ kiến thức
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Tổng hợp đề thi và bài giải môn LẬP TRÌNH WEB các kì (đề TRẮC NGHIỆM)

Go down

Tổng hợp đề thi và bài giải môn LẬP TRÌNH WEB các kì (đề TRẮC NGHIỆM) Empty Tổng hợp đề thi và bài giải môn LẬP TRÌNH WEB các kì (đề TRẮC NGHIỆM)

Bài gửi  Admin Fri Sep 20, 2013 4:40 pm

Tổng hợp đề thi trắc nghiệm LẬP TRÌNH WEB - thầy Nguyễn Phú Trường:
Link mediafire download: [You must be registered and logged in to see this link.]
Phần 3:PHP + MySQL
---
W3School PHP
1. What does PHP stand for?
PHP: Hypertext Preprocessor

2. PHP server scripts are surrounded by delimiters, which?
<?php ?>

3. How do you write "Hello World" in PHP
echo "Hello World";

4. All variables in PHP start with which symbol?
$

5. What is the correct way to end a PHP statement?
;

6. The PHP syntax is most similar to:
Perl and C

7. How do you get information from a form that is submitted using the "get" method?
$_GET[];

8. When using the POST method, variables are displayed in the URL:
False

9. In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
True

10. Include files must have the file extension ".inc"
False

11. What is the correct way to include the file "time.inc" ?
<?php include_file("time.inc"); ?>

12. What is the correct way to create a function in PHP?
function myFunction()

13. What is the correct way to open the file "time.txt" as readable?
fopen("time.txt","r");

14. PHP allows you to send emails directly from a script
True

15. What is the correct way to connect to a MySQL database?
mysql_connect("localhost")

16. What is the correct way to add 1 to the $count variable?
$count++;

17. What is a correct way to add a comment in PHP?
/*…*/

18. PHP can be run on Microsoft Windows IIS(Internet Information Server):
True

19. In PHP, the die() and exit() functions do the exact same thing.
True

20. Which one of these variables has an illegal name?
$my-Var
---
W3School SQL
---
1. What does SQL stand for?

You answered:

Structured Query Language
Correct Answer!

2. Which SQL statement is used to extract data from a database?

You answered:

SELECT
Correct Answer!

3. Which SQL statement is used to update data in a database?

You answered:

UPDATE
Correct Answer!

4. Which SQL statement is used to delete data from a database?

You answered:

DELETE
Correct Answer!

5. Which SQL statement is used to insert new data in a database?

You answered:

INSERT INTO
Correct Answer!

6. With SQL, how do you select a column named "FirstName" from a table named "Persons"?

You answered:

SELECT FirstName FROM Persons
Correct Answer!

7. With SQL, how do you select all the columns from a table named "Persons"?

You answered:

SELECT * FROM Persons
Correct Answer!

8. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

You answered:

SELECT * FROM Persons WHERE FirstName='Peter'
Correct Answer!

9. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

You answered:

SELECT * FROM Persons WHERE FirstName LIKE 'a%'
Correct Answer!

10. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

You answered:

True
Correct Answer!

11. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

You answered:

SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
Correct Answer!

12. With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?

You answered:

SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'
Correct Answer!

13. Which SQL statement is used to return only different values?

You answered:

SELECT DISTINCT
Correct Answer!

14. Which SQL keyword is used to sort the result-set?

You answered:

ORDER BY
Correct Answer!

15. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

You answered:

SELECT * FROM Persons ORDER BY FirstName DESC
Correct Answer!

16. With SQL, how can you insert a new record into the "Persons" table?

You answered:

INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
Correct Answer!

17. With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

You answered:

INSERT INTO Persons (LastName) VALUES ('Olsen')
Correct Answer!

18. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

You answered:

UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
Correct Answer!

19. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

You answered:

DELETE FROM Persons WHERE FirstName = 'Peter'
Correct Answer!

20. With SQL, how can you return the number of records in the "Persons" table?

You answered:

SELECT COUNT(*) FROM Persons
Correct Answer!
---
Question Your Answer Correct? Recommended Reading
The FROM SQL keyword is used to... specify the table we are are selecting or deleting from. Yes
Which of the following SQL statements has correct syntax? SELECT * FROM Table1 WHERE Column1 >= 10 Yes
What will be the result of the following SQL statement: SELECT * FROM Table1 HAVING Column1 > 10 The SQL statement will generate an error. Yes
If you join a table to itself, what kind of join are you using? Self Join Yes
The table rows are also known as... Records Yes
What does DML stand for? Data Manipulation language Yes
There are triggers for… update, delete and insert Yes
Which of the following is not a SQL keyword or SQL clause? INVERT Yes
The UPDATE SQL clause can… update more than one row at a time. Yes
What is a foreign key? A foreign key is a key field (column) in a database table, which relates the table to another table where the key is a primary key. The primary - foreign key relations are used to cross-reference database tables. Yes
What does the ALTER TABLE clause do? The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints. Yes
What is the INSERT command used for? To insert data. Yes
Can you use the SQL JOIN and SQL HAVING clauses in one SQL statement? Yes. Yes
Which SQL statement inserts data into a table called Projects? INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project') Yes
Normalization is… the process of arranging information stored in a database in a way, which removes redundancy and ambiguity. Yes
---
Which SQL statement is used to add rows to a table?

• UPDATE
• INSERT (correct answer, your response)
• ADD
• APPEND

Points earned: 1 out of 1

A primary key may contain NULLS.

• True
• False (correct answer, your response)

Points earned: 1 out of 1

SQL is a procedural language.

• True
• False (correct answer, your response)

Points earned: 1 out of 1

What SQL clause is used to restrict the rows returned by a query?

• WHEN
• HAVING
• FROM
• WHERE (correct answer, your response)

Points earned: 1 out of 1

Which of the following is the correct SQL statement to use to remove rows from a table?

• DROP
• REMOVE
• DELETE (correct answer, your response)
• All of the above

Points earned: 1 out of 1

With  locking a user may have to redo their work when a conflict occurs.

• deterministic
• optimistic (correct answer, your response)
• pessimistic

Points earned: 1 out of 1

A table may be joined to itself.

• True (correct answer, your response)
• False

Points earned: 1 out of 1

The two types of SQL environment are interactive and .

The following answer is acceptable:
embedded

Your response:
active

Feedback: The two environments are interactive and embedded.

Points earned: 0 out of 1

The result of a SELECT statement can contain duplicate rows.

• True (correct answer, your response)
• False

Points earned: 1 out of 1

To sort the results of a SELECT statement use the following clause:

• ORDERED BY
• SORT
• ORDER BY (correct answer, your response)
• SORT WITH
---
Câu 19-20:
[You must be registered and logged in to see this image.]
---
Kết quả:
[You must be registered and logged in to see this image.]
---
Phần 2: JAVASCRIPT + DHTML
---
Câu 1-2:
[You must be registered and logged in to see this image.]

Câu 3-4-5:
[You must be registered and logged in to see this image.]
---
Kết quả:
[You must be registered and logged in to see this image.]
---

------------------------------------------------------------------------------------------
20 câu trắc nghiệm phần JAVASCRIPT bằng file ảnh trên ELCIT.CTU.EDU.VN:
------------------------------------------------------------------------------------------
Câu 1 - 3:
[You must be registered and logged in to see this image.]

Câu 4 - 5:
[You must be registered and logged in to see this image.]

Câu 6 - 8:
[You must be registered and logged in to see this image.]
--------------------------------------------------
31 câu trắc nghiệm phần JAVASCRIPT:
--------------------------------------------------
1.      JavaScript là ngôn ngữ xử lý ở:
a.      Client
b.      Server
c.      Server/client
d.      Không có dạng nào.

2.      Javascript là ngôn ngữ thông dịch hay biên dịch
a.       Thông dịch
b.      Diễn dịch
c.      Cả hai dạng
d.      Không có dạng nào ở trên

3.      Phương thức viết chương trình của Javascript như thế nào?
a.      Viết riêng một trang
b.      Viết chung với HTML
c.      Cả hai dạng
d.      Không có dạng nào.

4.      Javascript là ngôn ngữ kịch bản có dấu được mã nguồn không?
a.      Không dấu được vì các kịch bản chạy ở client.
b.      Dấu được vì chương trình hoạt động độc lập với trình duyệt
c.      Hai phát biểu đều sai.

5.      JavaScript được bắt đầu bằng?
a.      <scritp> …</script>
b.      <Javascript> …<Javascript>
c.      <java>   </java>
d.      Tất cả các dạng trên.

6.      Javascript có các dạng biến?
a.      Number, String, Boolean
b.      Number, Integer, char
c.      Number, String, Boolean, Null
d.      Tất cả các loại trên.

7.      Trong Javascript hàm parseInt() dùng để làm gì?
a.       Chuyển một chuỗi thành số
b.      Chuyển một chuỗi thành số nguyên
c.      Chuyển một chuỗi thành số thực
d.      Chuyển một số nguyên thành một chuỗi

8.      Trong Javascript hàm parseFloat() dùng để làm gì?

a.       Chuyển một chuỗi thành số

b.      Chuyển một chuỗi thành số thực

c.      Chuyển một chuỗi thành số nguyên

d.      Chuyển một số nguyên thành một chuỗi

9.      Lệnh prompt trong Javascript để làm gì?

a.       Hiện một thông báo nhập thông tin

b.      Hiện một thông báo dạng yes, No

c.      Cả hai dạng trên

d.      Không có lệnh nào đúng

10. Trong Javascript sự kiện Onload thực hiện khi:
a.      Khi bắt đầu chương trình chạy
b.      Khi click chuột
c.      Khi kết thúc một chương trình
d.      Khi di chuyển chuột qua.

11. Trong Javascript sự kiện OnUnload thực hiện khi nào?

a.       Khi bắt đầu chương trình chạy

b.      Khi click chuột

c.      Khi kết thúc một chương trình

d.      Khi di chuyển chuột qua.

12. Trong Javascript sự kiện Onblur thực hiện khi nào?

a.       Khi một đối tượng trong form mất focus.

b.      Khi một đối tượng trong form có focus

c.      Khi di chuyển con chuột qua form.

d.      Khi click chuột vào nút lệnh

13. Trong Javascript sự kiện OnMouseOver thực hiện khi nào?

a.       Khi một đối tượng trong form mất focus.

b.      Khi một đối tượng trong form có focus

c.      Khi di chuyển con chuột qua một đối tượng trong form.

d.      Khi click chuột vào nút lệnh

14. Trong Javascript sự kiện Onclick thực hiện khi nào?

a.       Khi một đối tượng trong form mất focus.

b.      Khi một đối tượng trong form có focus

c.      Khi click chuột vào một đối tượng trong form.

d.      Khi click chuột vào nút lệnh

15. Trong Javascript sự kiện Onchange thực hiện khi nào?

a.       Khi một đối tượng trong form mất focus.

b.      Khi một đối tượng trong form có focus

c.      Xảy ra khi giá trị của một trường trong form được người dùng thay đổi

d.      Khi click chuột vào nút lệnh

16. Trong Javascript đoạn mã sau cho ra kết quả gì?

<script>

function kiemtra(){

window.open("http://www.vnn.vn","Chao");

}

</script>

</head>

<body onload ="kiemtra()"></body>

a.     Khi chạy thì một trang khác (VNN) được hiện ra .  

b.     Không chạy được vì sai

c.     Khi kết thúc thì một site khác hiện ra

d.     Hiện một trang vnn duy nhất.

17. Thẻ <input type=”text” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu 1 dòng

b.      Tạo một ô password

c.      Tạo một  textbox cho phép nhập liệu nhiều dòng

d.      Tất cả các ý trên

18.  Thẻ <input type=”Password” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu 1 dòng

b.      Tạo một ô password

c.      Tạo một  textbox cho phép nhập liệu nhiều dòng

d.      Tất cả các ý trên

19. Thẻ <textarea rows=. . . cols =  …></texterea> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu 1 dòng

b.      Tạo một ô password

c.      Tạo một  textbox cho phép nhập liệu nhiều dòng

d.      Tất cả các ý trên

20. Thẻ <input type=”Submit” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu

b.      Tạo một nút lệnh dùng để gửi tin trong form đi

c.      Tạo một nút lệnh dùng để xóa thông tin trong form

d.      Tất cả các ý trên

21. Thẻ <input type=”Radio” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu

b.      Tạo một nhóm đối tượng chọn nhưng  chọn duy nhất

c.      Tạo một  cùng có nhiều cột nhiều dòng

d.      Tất cả các ý trên

22. Thẻ <input type=”checkbox” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu

b.      Tạo một nhóm đối tượng chọn được nhiều đối tượng

c.      Tạo một  cùng có nhiều cột nhiều dòng

d.      Tất cả các ý trên

23. Thẻ <input type=”button” …> dùng để làm gì?

a.       Tạo một ô text để nhập dữ liệu

b.      Tạo một nút lệnh lên trên form

c.      Tạo một  cùng có nhiều cột nhiều dòng

d.      Tất cả các ý trên

24. Lệnh lặp for có dạng như thế nào?

a.       for ( biến = Giá trị đầu; Điều kiện; Giá trị tăng)

b.      for ( biến = Giá trị đầu; Giá trị tăng; điều kiện)

c.      for ( biến = Điều kiện; Giá trị tăng; Giá trị cuối)

d.      Tất cả các dạng trên.

25. Vòng lặp While là dạng vòng lặp?

a.       Không xác định và xét điều kiện rồi mới lặp

b.      Không xác định và  lặp rồi mới xét điều kiện

c.      Cả hai dạng trên

d.      Không tồn tại dạng nào ở trên.

26. Vòng lặp (Do.. while) là dạng vòng lặp?

a.       Không xác định và xét điều kiện rồi mới lặp

b.      Không xác định và lặp rồi mới xét đ-iều kiện

c.      Cả hai dạng trên

d.      Không có dạng nào.

27. Lệnh break kết hợp với vòng for dùng để?

a.       Ngưng vòng for nếu gặp lệnh này

b.      Không có ý nghĩa trong vòng lặp

c.      Nhảy đến một tập lệnh khác

d.      Không thể kết hợp được.

28. Hàm alert() dùng để làm gì?

a.       Dùng để hiện một thông.

b.      Dùng để hiện một thông báo nhập

c.      Dùng để chuyển đổi số sang chữ

d.      Tất cả các dạng trên.

29. Thẻ <Frameset cols> </frameset>

a.       Dùng để chia trang web ra nhiều phần theo cột

b.      Dùng để chia trang web ra nhiều phần theo dòng

c.      Tất cả dạng trên

d.      Không có ý nào ở trên.

30. Thẻ <Frameset rows > </frameset>

a.       Dùng để chia trang web ra nhiều phần theo cột

b.      Dùng để chia trang web ra nhiều phần theo dòng

c.      Tất cả dạng trên

d.      Không có ý nào ở trên.

31. Thẻ <Frame src=” duong dan  ”>

a.       Dùng để chèn ảnh

b.      Dùng để lấy dữ liệu từ một trang khác

c.      Tất cả dạng trên

d.      Không có ý nào ở trên.

-------------------------------------------------------------------------
20 CÂU TRẮC NGHIỆM TRÊN W3SCHOOL về JAVASCRIPT
-------------------------------------------------------------------------
JavaScript QUIZ Points: 20 out of 20
1. Inside which HTML element do we put the JavaScript?

You answered:

<script>
Correct Answer!

2. What is the correct JavaScript syntax to write "Hello World"?

You answered:

document.write("Hello World");
Correct Answer!

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

You answered:

Both the <head> section and the <body> section are correct
Correct Answer!

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

You answered:

<script src="xxx.js">
Correct Answer!

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

You answered:

False
Correct Answer!

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

You answered:

alert("Hello World");
Correct Answer!

7. How do you create a function in JavaScript?

You answered:

function myFunction()
Correct Answer!

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

You answered:

myFunction()
Correct Answer!

9. How to write an IF statement in JavaScript?

You answered:

if (i==5)
Correct Answer!

10. How to write an IF statement for executing some code if "i" is NOT equal to 5?

You answered:

if (i != 5)
Correct Answer!

11. How does a WHILE loop start?

You answered:

while (i<=10)
Correct Answer!

12. How does a FOR loop start?

You answered:

for (i = 0; i <= 5; i++)
Correct Answer!

13. How can you add a comment in a JavaScript?

You answered:

//This is a comment
Correct Answer!

14. How to insert a comment that has more than one line?

You answered:

/*This comment has
more than one line*/
Correct Answer!

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

You answered:

var txt = new Array("tim","kim","jim")
Correct Answer!

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

You answered:

Math.round(7.25)
Correct Answer!

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

You answered:

Math.max(x,y)
Correct Answer!

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

You answered:

w2=window.open("http://www.w3schools.com");
Correct Answer!

19. JavaScript is the same as Java.

You answered:

False
Correct Answer!

20. How can you detect the client's browser name?

You answered:

navigator.appName
Correct Answer!


By W3Schools Time spent: 2:52
-----

-----
1. What does CSS stand for?

You answered:

Cascading Style Sheets
Correct Answer!

2. What is the correct HTML for referring to an external style sheet?

You answered:

<link rel="stylesheet" type="text/css" href="mystyle.css">
Correct Answer!

3. Where in an HTML document is the correct place to refer to an external style sheet?

You answered:

In the <head> section
Correct Answer!

4. Which HTML tag is used to define an internal style sheet?

You answered:

<style>
Correct Answer!

5. Which HTML attribute is used to define inline styles?

You answered:

style
Correct Answer!

6. Which is the correct CSS syntax?

You answered:

body {color: black;}
Correct Answer!

7. How do you insert a comment in a CSS file?

You answered:

/* this is a comment */
Correct Answer!

8. Which property is used to change the background color?

You answered:

background-color
Correct Answer!

9. How do you add a background color for all <h1> elements?

You answered:

h1 {background-color:#FFFFFF;}
Correct Answer!

10. Which CSS property is used to change the text color of an element?

You answered:

color
Correct Answer!

11. Which CSS property controls the text size?

You answered:

font-size
Correct Answer!

12. What is the correct CSS syntax for making all the <p> elements bold?

You answered:

p {font-weight:bold;}
Correct Answer!

13. How do you display hyperlinks without an underline?

You answered:

a {text-decoration:none;}
Correct Answer!

14. How do you make each word in a text start with a capital letter?

You answered:

text-transform:capitalize
Correct Answer!

15. Which property is used to change the font of an element?

You answered:

Both font-family and font can be used
Correct Answer!

16. How do you make the text bold?

You answered:

font-weight:bold;
Correct Answer!

17. How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

You answered:

border-width:10px 1px 5px 20px;
Correct Answer!

18. Which property is used to change the left margin of an element?

You answered:

margin-left
Correct Answer!

19. When using the padding property; are you allowed to use negative values?
You answered:No

20. How do you make a list that lists its items with squares?
You answered:list-style-type: square;
Admin
Admin
Admin

Tổng số bài gửi : 218
Reputation : 22
Join date : 17/11/2012
Age : 32

https://elcit.forumvi.com

Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết