Chapter1 CIST 1520 (JavaScript)

Ace your homework & exams now with Quizwiz!

Like HTML, XHTML is not case sensitive. a. True b. False

False

You can place script elements in either the document head or in the document body. a. True b. False

True

What organization oversees the development of web technology standards? A. U.S Department of Defense B. World Wide Web Consortium C. Stanford University D. United Nations

World Wide Web Consortium

What is the difference between character data and parse character data? What does this have to do with JavaScript?

-Character data - a section of a HTML document that is NOT interpreted as mark up. When you validate an HTML document containing a script section, the document would validate successful because the validator would ignore the script section and not attempt to interpret the text and symbols in the JavaScript statements as HTML elements of attributes. -Parsed character data - a section of a HTML document that IS interpreted as mark up If you attempt to validate an XHTML document that contains a script section, it will fail the validation

What is the difference between web page design, web page authoring, and web development?

-Web page design - visual design & creation of the documents that appear on the web -Web page authoring - creation & assembly of the tags, attributes, and the data that make up a web page -Web development - the design of software application for a website

Write the JavaScript to add the text "Copyright 2017" as a line comment. Write the JavaScript to add the same text as a block comment.

//copyright 2017 /*copyright 2017 copyright 2017 */

9.How do you create a single-line comment in JavaScript? How do you create a multiple comment in JavaScript?

//single line /*Multiple lines comments like this */

Which of the following is not a valid identifier? A. $InterestRate B. 2QInterest Rate C. interestRate D. _interestRate

2QInterest Rate -You cannot include spaces

Which of the following functions does the processing tier NOT handle in a three-tier client/server system? A. Processing and calculations B. Reading and writing of information to the data storage tier C. The return of any information to the client tier D. Data Storage

Data Storage

____ can turn static documents into applications such as games or calculators. a. HTML b. XHTML c. JavaScript d. Cascading Style Sheets

JavaScript

Some of the more popular server-side scripting languages include ____. a. C, C++, and CGI b. JScript, Livescript, and ECMAScript c. PHP, ASP.NET, and Python d. VBS and JScript

PHP, ASP.NET, and Python

A URL is a type of A. web page B. URI C. link D. network

URI (Uniform Resource Identifier)

A document on the web is called a web page and is identified by a unique address called the _________________________.

Uniform Resource Locator(URL)

13.What is an event handler for?

When an event occurs, your script executes any code responds to that specific event on that specific element.

14.Why should you place script at the end of an HTML document's body section?

You allow the browsers to render all the simple HTML content before processing JavaScript. This ensure that users can see and interact with the entire webpage as quickly as possible.

12.How do you change the value of a variable?

You can change a variable's value at any point in a script by using a statement that includes the variable's name, followed by an equal = sign, followed by the value you want to assign to the variable.

15.How do you incorporate the contents of a JavaScript source file into an HTML document?

You use src attribute of the script element and assign it to a source file.

A(n) ____ comment hides multiple lines of code. a. variable b. element c. line d. block

block

____ are lines of code that are not processed by browsers, which you use to add notes about your code. a. methods b. comments c. variables d. properties

comments

An object is ____ that can be treated as an individual unit or component. a. state and contents b. file and data c. formatting and color d. programming code and data

d. programming code and data

When a client requests a server-side script, a client will never see the server-side script, only the ____ that the web server software returns from the script. a. email sent b. program executing c. HTML d. raw data requested

d. raw data requested

____ refers to programming using a scripting language that is executed from a web server. a. Host-side scripting b. Client-side scripting c. Servlet-side scripting d. Server-side scripting

d.Server-side scripting

11.What is the difference between declaring and initializing a variable?

declaring a variable -using the var keyword to create a variable. Initialize: by adding an equal sign ( = ) after the variable name, followed by the value you're assigning to the variable.

Which of the following user the correct case? A. Document.write(); B. document.write(); C.document.Write(); D. Document.Write();

document.write();

Elements that do not require a closing tag are called ________ elements. A. independent B. empty C. permanent D. constant

empty

A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script can respond to in some way.

event

Code that tells a browser what to do in response to a specific event on a specific element is called a (an)____. A. method B. event handler C. response D. procedure

event handler

Which method do you use to reference an element on a web page in a script? a. write() b. alert() c. onclick() d. getElementById()

getElementById()

What is the root element of an HTML document? A. head B. body C. html D. script

html

When you assign a specific value to a variable on its creation, you _________ it. A. declare B. call C. assign D. initialize

initialize

6.What is ECMAScript? Why was it created?

is an international, standardized version of JavaScript. It was created to ensure that all browsers implemented a common scripting language rather than using customized, incompatible variations.

5.What does the middle tier do in a three-tier architecture?

it handles the interaction between the web browser client and the data storage tier. The client tier makes request on web server. The processing tier calculates, then read info or write info to the data storage and returns info to the client tier

JavaScript source files that store especially useful generic scripts used on many different website are known as __________.

libraries

A(n) ____ comment occupies only a single line or part of a line. a. variable b. element c. line d. block

line

The procedures associated with an object are called ____. a. methods b. processes c. attributes d. functions

methods

Variables and literals contained in an expression are known as ____. a. operators b. operands c. events d. properties

operands

Symbols such as + and * used in expressions to manipulate operands are known as ____. a. operators b. variables c. events d. properties

operators

Special words that are part of the JavaScript language syntax and that can't be used as variable names are known as ____. a. identifiers b. reserved words c. operands d. operators

reserved words

7.JavaScript code in an HTML document goes within which HTML element?

script

On client/server systems, heavy processing, such as calculations, usually takes place on the ____. a. client b. server c. middle-ware d. browser

server

An HTML document is a text document that contains codes called ____. a. elements b. tags c. styles d. rules

tags

A three-tier, or multitier, client/server system consists of three distinct pieces: These are ____. a. the client tier, the processing tier, and the data storage tier b. the client tier, the design tier, and the processing tier c. the storage tier, the distributing tier, and the processing tier d. the email tier, the messaging tier, and the data storage tier

the client tier, the processing tier, and the data storage tier

What is usually the primary role of a client? A. locating records that match a request B. heavy processing, such as calculations C. Data storage D. the presentation of an interface to the user

the presentation of an interface to the user

A system consisting of a client and a server is known as a______. A. mainframe topology B. double-system architecture C. two-tier system D. wide area network

two-tier system

Which keyword do you use to create a variable? a. for b. value c. assign d. var

var

Write a statement that creates a variable with the identifier title and the value "Dr."

var doctor = "Dr.";

Which method displays a dialog box with an OK button? a. document.write() b. document.writeln() c. window.alert() d. window.popup()

window.alert()

What is a library?

A JavaScript source file that contains especially useful generic scripts used on many different websites.

Although JavaScript is considered a programming language, it is also a critical part of web page design and authoring. a. True b. False

True

BOOK QUESTIONS

BOOK QUESTIONS

8.Why should you end every JavaScript statement with a semicolon?

Because it identify the end of each statement

A section of a document that is not interpreted as markup is referred to as_______. A. PDATA B. CDATA C. PCDATA D. CPDATA

CDATA (character data)

__________ is a separate, complementary language to HTML that was developed for specifying the appearance of webpage elements. A. HTML B. SGML C. XML D. CSS

CSS

4.In a client/server architecture, what is a client? What is a server?

Client (front end) - in two-tier system is the presentation of an interface to the user.The server - database which client requests. It managing, and serving the request info to the client. The server is usually some sort of database from which a client requests information. A server fulfills a request for information by managing the request or serving the requested information to the client—hence the term, client/server. One of the primary roles of the client, or front end, in a two-tier system is the presentation of an interface to the user. The user interface gathers information from the user, submits it to a server, or back end, then receives, formats, and presents the results.

1. What method of accessing documents did Tim Berners-Lee Create? What was noteworthy about his system?:

Hypertext linking. It was a way to easily access cross-referenced documents stored on a computer network.

JavaScript code is always stored in an external file separate from the HTML or XHTML code for a web document. a. True b. False

False

The markup language originally developed to create web pages and still in use today is called? A. HTML B. SGML C. XML D. CSS

HTML

____ was established in 1994 at MIT to oversee the development of web technology standards. a. The University of Illinois b. The W3C c. Microsoft d. Netscape

The W3C

2.What does W3C stand for? What does the organization do?:

The World Wide Web Consortium. It oversees the development of web technology standards.

10.What is an identifier? What limits does JavaScript place on an identifier?

The name you assign to a variable. -You must begin with lower or upper ASCII letter, $, or _. -You cannot include spaces -You cannot use reserved words for identifiers.

3.What are the codes in an HTML document called? What function do they serve?

They are called tags. They specify how the data in the document is treated by a web browser.

When you assign a value to a variable, you use an equal sign, which is also called a(n) __________ operator.

assignment


Related study sets

Community Health Exam #4 (Final)

View Set

Basic Principles of the FTSE 100 Index

View Set

Anatomy of the Female Reproductive Tract (L3Wk1)

View Set

The Enlightenment: Chapter 4-John Locke, The Enlightenment: Chapter 3-Thomas Hobbes, The Enlightenment: Chapter 5-The Enlightenment in France, The Enlightenment: Chapter 6-The Enlightenment in Action

View Set

MIS 2749 Data Analytics and Data Ecosystems

View Set