Project #11446 - Javascript

 

Question 1 text   Question 1        2 points                Save 

                Assume that variable sales holds a value of 57.963. Which statement will print "The total sales amount is $57.96"?

Question 1 answers

                                document.write("The total sales amount is $" + sales.toFixed(2));

                                document.write("The total sales amount is $" + sales.toPrecision(2));

                                document.write("The total sales amount is $" + sales.toDecimal(2));

                                document.write("The total sales amount is $" + sales.toFloat(2));

 

Question 2 text   Question 2        2 points                Save 

                All of the following are properties of the Number class except:

Question 2 answers

                                MAX_VALUE

                                MIN_VALUE

                                NaN

                                INFINITY

 

Question 3 text   Question 3        2 points                Save 

                All of the following are properties of the Number class except _____.

Question 3 answers

                                MAX_VALUE

                                NaN

                                NEGATIVE_INFINITY

                                INFINITY

 

Question 4 text   Question 4        2 points                Save 

                The Number class method that converts a number to a string using a specified radix is the _____ method.

Question 4 answers

                                toFixed( )

                                toPrecision( )

                                toLocaleString( )

                                toString( )

 

Question 5 text   Question 5        2 points                Save 

                An object-based language does not allow you to create your own:

Question 5 answers

                                classes

                                objects

                                properties

                                methods

 

Question 6 text   Question 6        2 points                Save 

                To add elements to an array, use the:

Question 6 answers

                                splice method with a value of zero as the second argument

                                splice method with the first element you are adding in the second argument position

                                slice method with a value of zero as the second argument

                                slice method with the first element that you are adding in the second argument position

 

Question 7 text   Question 7        2 points                Save 

                What statement is true in reference to Constructor functions?

Question 7 answers

                                Any JavaScript function can server as a constructor.

                                Only custom functions can serve as a constructor.

                                Only built-in functions can server as a constructor.

                                Object are the basis for Constructor functions, not functions.

 

Question 8 text   Question 8        2 points                Save 

                The Math class method that determines the square root of a number is written as:

Question 8 answers

                                Math.sqrt(x)

                                Math.sqr(x)

                                Math sqrt(x)

                                Math.sqrt2(x)

 

Question 9 text   Question 9        2 points                Save 

                Which term refers to programming code and data that can be treated as an individual unit or component?

Question 9 answers

                                OOP

                                object

                                data

                                methods

 

Question 10 text   Question 10   2 points                Save 

                All of the following are Number class methods except _____.

Question 10 answers

                                Number( )

                                toString( )

                                MaxValue( )

                                toFixed( )

 

Question 11 text   Question 11   2 points                Save 

                Which statement correctly utilizes the square root method of the Math class?

Question 11 answers

                                var myNum = 64;

squared = sqrt(myNum);

document.write("The square root of " + number = " is "+ squared);

                                var myNum = 64;

squared = sqrt.myNum;

document.write("The square root of " + number = " is " + squared);

                                var myNum = 64;

squared = Math.sqrt(myNum);

document.write("The square root of " + number = " is " + squared);

                                var myNum = 64;

squared = Math.sqrt.myNum;

document.write("The square root of " + number = " is " + squared);

 

Question 12 text   Question 12   2 points                Save 

                If you create a new Date object using the statement var curDate = new Date( ); which of the following statements will retrieve just the date portion stored in the curdate object?

Question 12 answers

                                curDate.setDate( );

                                curDate.getDate( );

                                curDate.valueOf( );

                                curDate.Date( );

 

Question 13 text   Question 13   2 points                Save 

                The _____ is a built-in property that specifies the constructor from which an object was extended.

Question 13 answers

                                class

                                method

                                constructor

                                prototype

 

Question 14 text   Question 14   2 points                Save 

                The built-in JavaScript class that contains methods and properties for replacing characters in text strings is the _____ class.

Question 14 answers

                                String

                                RegExp

                                Text

                                Replace

 

Question 15 text   Question 15   2 points                Save 

                Another term for constructor function is a(n):

Question 15 answers

                                object function

                                constructor definition

                                object definition

                                function definition

 

Question 16 text   Question 16   2 points                Save 

                The Array class method that adds and returns a new array element is the _____ method.

Question 16 answers

                                push( )

                                pop( )

                                join( )

                                Array( )

 

Question 17 text   Question 17   2 points                Save 

                The _____ attribute of the <input> element determines the MIME type of a document that is uploaded with a file box.

Question 17 answers

                                value

                                accept

                                enctype

                                src

 

Question 18 text   Question 18   2 points                Save 

                The onsubmit and onreset event handlers must return a Boolean value.

Question 18 answers

                True

                False

 

Question 19 text   Question 19   2 points                Save 

                The most important function for validating form data is the ____ event handler.

Question 19 answers

                                onreset

                                onsubmit

                                onclick

                                onmouseout

 

Question 20 text   Question 20   2 points                Save 

                Which of the following properties of the Option object is a Boolean attribute?

Question 20 answers

                                label

                                disabled

                                value

                                selected

 

Question 21 text   Question 21   2 points                Save 

                Which statement removes a single option from a selection list?

Question 21 answers

                                document.form[0].state.options[0]= -1;

                                document.form[0].state.options[0]= 0;

                                document.form[0].state.options[0]= " ";

                                document.form[0].state.options[0]= null;

 

Question 22 text   Question 22   2 points                Save 

                Based on the following form, how would you reference the Salary text box in JavaScript code? Assume this is the only form on a Web page and you are submitting the form to a server-side script.

 

<form action=post>

Employee <input name=employee><br />

Position <input name=position><br />

Salary <input name=salary><br />

Status <input name=status><br />

<input type=submit value="Submit Query"><br />

</form>

Question 22 answers

                                document.forms[0].elements[2]

                                document.form.salary

                                document.form[0].elements[3]

                                document.salary

 

Question 23 text   Question 23   2 points                Save 

                The default MIME type is correctly written as:

Question 23 answers

                                application/www-x-form-urlencoded

                                application/x-www-form-urlencoded

                                application/form-www-x-urlencoded

                                application/x_www_form_urlencoded

 

Question 24 text   Question 24   2 points                Save 

                The attribute that specifies which radio button is selected within a group of radio buttons when a Web page loads is the _____ attribute.

Question 24 answers

                                selected

                                checked

                                selectedIndex

                                value

 

Question 25 text   Question 25   2 points                Save 

                Which of the following statements correctly creates two radio buttons in the same group?

Question 25 answers

                                Please select the highest educational degree you have received:<br />

<input type="radio" name="High School diploma" value="education" />HS<br />

<input type="radio" name="Bachelors degree" value="education" />BA or BS<br />

                                Please select the highest educational degree you have received:<br />

<input type="radio" name="education" value="High school" />HS<br />

<input type="radio" name="education" value="Bachelors degree" />BA or BS<br />

                                Please select the highest educational degree you have received:<br />

<input type="radio" name="1st degree" value="High school" />HS<br />

<input type="radio" name="2nd degree" value="Bachelors degree" />BA or BS<br />

                                Please select the highest educational degree you have received:<br />

<input type="radio" name="High school" value="1st degree" />HS<br />

<input type="radio" name="Bachelors degree" value="2nd degree" />BA or BS<br />

 

Question 26 text   Question 26   2 points                Save 

                To add a new option to a selection list after a Web page renders it, you must create a new option with the:

Question 26 answers

                                Option constructor

                                Object constructor

                                Option element

                                Object method

 

Question 27 text   Question 27   2 points                Save 

                The _____ attribute of the <input> element accepts an integer value that determines the width of a text box in characters.

Question 27 answers

                                maxlength

                                value

                                size

                                width

 

Question 28 text   Question 28   2 points                Save 

                When multiple form elements share the same name, JavaScript creates an array out of the elements using the shared name.

Question 28 answers

                True

                False

 

Question 29 text   Question 29   2 points                Save 

                Which of the following statements will specify a value of true for a Boolean attribute when using XHTML?

Question 29 answers

                                <input type="checkbox" value="checked" />

                                <input type="checked" />

                                <input type="checkbox" checked />

                                <input type="checkbox" checked="checked"/>

 

Question 30 text   Question 30   2 points                Save 

                A server-side scripting program can use the value of the _____ attribute to determine how to process form data.

Question 30 answers

                                method

                                enctype

                                accept-charset

                                action

 

Question 31 text   Question 31   2 points                Save 

                The _____ option of the method element appends form data as one long string to the specified URL.

Question 31 answers

                                get

                                send

                                post

                                append

 

Question 32 text   Question 32   2 points                Save 

                _____ is the default option of the method attribute of the <form> element.

Question 32 answers

                                send

                                get

                                post

                                append

 

Question 33 text   Question 33   2 points                Save 

                Which of the following resets a form without the use of a reset button?

Question 33 answers

                                reset( )

                                reset

                                reset[ ]

                                You cannot reset a form without a reset button.

 

Question 34 text   Question 34   2 points                Save 

                The Window object method that removes focus from a window is the _____ method.

Question 34 answers

                                blur( )

                                scrollTo( )

                                focus( )

                                moveTo( )

 

Question 35 text   Question 35   2 points                Save 

                Including an argument of true with the reload( ) method cause the current Web page to:

Question 35 answers

                                reload from the server where it is located into a new browser window - only if changes have been made to the page

                                reload from the server where it is located - even if no changes have been made to the page

                                reload from the user's cache - even if no changes have been made to the page

                                reload from the user's cache - only if changes have been made to the page

 

Question 36 text   Question 36   2 points                Save 

                Which property of the Location object refers to the full URL address?

Question 36 answers

                                hash

                                href

                                hostname

                                host

 

Question 37 text   Question 37   2 points                Save 

                The property of the Location object that is a combination of the URL's host name and port section is the _____ property.

Question 37 answers

                                hash

                                host

                                hostname

                                href

 

Question 38 text   Question 38   2 points                Save 

                Even though the textbook refers to the Document object with a capital "D," when referring to the document object in JavaScript, you must always use a lowercase "d."

Question 38 answers

                True

                False

 

Question 39 text   Question 39   2 points                Save 

                All of the following are methods of the History object EXCEPT:

Question 39 answers

                                back( )

                                forward( )

                                url( )

                                go( )

 

Question 40 text   Question 40   2 points                Save 

                The Window object property that refers to the window that opened the current window is the _____ property.

Question 40 answers

                                navigator

                                history

                                name

                                opener

 

Question 41 text   Question 41   2 points                Save 

                Which of the following does not refer to the browser object model?

Question 41 answers

                                JavaScript object model

                                Document object model

                                Navigator object model

                                Client-side object model

 

Question 42 text   Question 42   2 points                Save 

                All of the following are objects EXCEPT:

Question 42 answers

                                History

                                Status

                                Screen

                                Location

 

Question 43 text   Question 43   2 points                Save 

                The _____ event occurs when you point to an element and hold the mouse button down.

Question 43 answers

                                click

                                mousedown

                                mouseover

                                mouseout

 

Question 44 text   Question 44   2 points                Save 

                If you include the options string of the open( ) method, then:

Question 44 answers

                                all the standard options are included in the new Web browser window plus the ones you specify in the options string

                                only those options specified in the options string are included in the new Web browser window

                                some but not all of the standard options are included in the new Web browser window plus those which you specify in the options string

                                None of the above

 

Question 45 text   Question 45   2 points                Save 

                When you open a blank window using Internet Explorer, the window title bar and address box read:

Question 45 answers

                                "blank"

                                "about"

                                "about:blank"

                                None of the above.

 

Question 46 text   Question 46   2 points                Save 

                The top level object in the browser object model is the:

Question 46 answers

                                Window

                                Document

                                Form

                                Frame

 

Question 47 text   Question 47   2 points                Save 

                Which object allows you to change to a new Web page from within JavaScript code?

Question 47 answers

                                History

                                Location

                                Navigator

                                URL

 

Question 48 text   Question 48   2 points                Save 

                Rollovers are usually created with the:

Question 48 answers

                                mouseover event.

                                mouseout event.

                                click event.

                                dblclick event.

 

Question 49 text   Question 49   2 points                Save 

                All of the following are arguments of the Window object's open( ) method EXCEPT:

Question 49 answers

                                replace

                                name

                                options

                                href

 

Question 50 text   Question 50   2 points                Save 

                Each frame in a Web page contains its own:

Question 50 answers

                                Window, Location, History, and Navigator objects

                                Window object

                                Window and History objects

                                Window, Location, and Navigator objects

 

 

Subject Computer
Due By (Pacific Time) 08/28/2013 12:00 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy