Question

In: Computer Science

1. What is the translation of the following jQuery statement? if($('input.firstname').val() == "Bob"){ $('select').attr('disabled', true); }...

1. What is the translation of the following jQuery statement?

if($('input.firstname').val() == "Bob"){
$('select').attr('disabled', true);
}

If an input with the class 'firstname' has a value equal to 'Bob', disable all dropdown boxes.

If an input with the type 'firstname' has a value equal to 'Bob', select all elements with a 'disabled' attribute.

I have no idea what this means.

If all inputs have a value equal to Bob, disable all dropdown boxes.

2. Which javascript function can be used to display content in the browser?

echo()

document.print()

document.write()

printf()

3. Which of the following is NOT a comparsion operator?

===

!=

<

=

4. To specify where a link should go once it is clicked, the ___ attribute of the <a> tag must be specified.

type

href

src

rel

Solutions

Expert Solution

  • Answers with explanation(answers are given in bold text) -

1. If an input with the type 'firstname' has a value equal to 'Bob', select all elements with a 'disabled' attribute.

Reason - In the if statement, we are checking if the value of firstname is "Bob", then we are selecting all attributes whose disabled field is true. Meaning, selecting all elements with a disabled attributes.

2. document.write() function can be used to display the content in browser.
Reason - Javascript can display data in browser as follows :
a. Writing into HTML output using document.write()
b. echo() is a statement used to display text in php.
c. printf() is used to display text in C language.

3. '=' is not a comparison operator.
Reason -
a. != - It is a comparison operator called "not equal to". It checks for inequality.
b. < - It is a comparison operator called "less than".
c. === - It is a comparison operator used for equality comparison. This operator tests for strict equality. Means, It will not do the type connversion. Hence, if two values are not of same type when compared, it will return false.
d. = - It is an assignment operator. It is used to assign values to variabes or identifiers. For x, "x = 10".

4. To specify where a link should go once it is clicked, the href attribute of the <a> tag must be specified.
Reason -
a. type - The type attribute is used to specify the Internet media type of a script.
b. src - The src attribute is used to specify the URL of the media file to play. For example, this attribute will be required when source is used in ausio and video.
c. rel - The rel attribute defines the relationship between a linked resource and the current document.
d. href - It is an attribute of the anchor tag. It contains two sections, the URL which is the actual link where it should go and the clickable text that appears on the page, known as anchor text.


Related Solutions

1) Which of the following are TRUE about the process of translation? (Select all that apply)...
1) Which of the following are TRUE about the process of translation? (Select all that apply) Transcription factors attach to the mRNA to promote its circularization in the cytoplasm Binding of the large ribosomal subunit is the end of the initiation stage The third base of a codon permits wobble pairing Charged tRNAs enter the P site prior to being added to the protein chain There are three stages: initiation, elongation, and termination The process cannot be regulated until after...
Select the TRUE statement from the following: Select one: a. The outermost electrons of Fe3+ are...
Select the TRUE statement from the following: Select one: a. The outermost electrons of Fe3+ are more energetic than the outermost electrons of Fe0 b. When the Cr atom loses electrons to become positively charged, the first electrons lost are from the 3d subshell. c. For any given element, the anion will be smaller than the neutral atom. d. For any given element, the cation will be smaller than the neutral atom.
Select True or False, depending on whether the corresponding statement is true or false. 1. An...
Select True or False, depending on whether the corresponding statement is true or false. 1. An unbiased estimator is a sample statistic that has a mean (or expected value) equal to the value of the population parameter. 2. In order to construct a confidence interval estimate of the population mean, the value of the population mean is needed. 3. The larger the level of confidence used in constructing a confidence interval estimate of the population mean, the narrower the confidence...
Select True or False depending on whether the corresponding statement is true or false. 1. Let...
Select True or False depending on whether the corresponding statement is true or false. 1. Let z1 be a z− score that is unknown but identifiable by position and area. If the area to the right of z1 is 0.8413, the value of z1 is 1.0 2. The mean and standard deviation of an exponential random variable are equal to each other. 3. Using the standard normal curve, the z−score representing the 90th percentile is 1.28. 4. A random variable...
Question 9 What is produced from the following code segment? val = 0; do { val++;...
Question 9 What is produced from the following code segment? val = 0; do { val++; WriteLine(val); } while (val < 5); Nothing is displayed Outputs 5 thru 9 Outputs 10 Outputs 1 thru 4 Outputs 1 thru 5 Outputs 10 thru 14 Outputs 0 thru 4 Question 10 Assuming val was described as an integer and an initial value of 10, what is produced from the following code segment? do { WriteLine(val); } while (val < 10); Nothing is...
Which of the following is true about disability insurance? It benefits the disabled employee only for...
Which of the following is true about disability insurance? It benefits the disabled employee only for the first year of disability. Payments under short-term plans are less than that of long-term plans. It pays about 50% to 70% of the employee's salary in case of disability. Most employers offer long-term disability plans. It offers coverage when the employee's dependent is disabled.
Which one of the following statements concerning the statement of work are true? Select all that...
Which one of the following statements concerning the statement of work are true? Select all that apply in: A. It identifies tasks to be performed and the outer limits of the contractor's effort. B. it may be written by the givernment, the contractor, or both. C. it lists the FAR clauses applicable to the contract. D. its use is commonly referred to as performance-based contracting.
Which of the following statement(s) is(are) true? Select one or more: a. The building constructed by...
Which of the following statement(s) is(are) true? Select one or more: a. The building constructed by the builder can’t serve as collateral on the loan application of builders. b. The land of the building can be treated as security in the loan application of the property developers. c. A wise property developer should start to build properties when the current demand on the market is high. d. A property development loan is bridge finance for the borrower to develop land...
Select the statement which best summarizes the initiation of translation. The large ribosomal subunit binds to...
Select the statement which best summarizes the initiation of translation. The large ribosomal subunit binds to the mRNA first and the small subunit binds last The small ribosomal subunit binds to the mRNA first and the large subunit binds last Both subunits of the ribosome bind to the mRNA simultaneously There is no large ribosomal subunit, only a small subunit
Which of the following is a true statement? Which of the following is a true statement?...
Which of the following is a true statement? Which of the following is a true statement? a. The electric potential energy depends on both the electric field and the amount of charge moving through that field. b. The electric potential depends on both the electric field and the amount of charge moving through that field. c. The electric potential energy and the electric potential depend on both the electric field and the amount of charge moving through that field. d....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT