1. Question: If an image is placed styled with z-index=-1 and a text paragraph is overlapped with it. Which one will be displayed on top?

    A
    The paragraph

    B
    The image

    C
    Could be any of the above

    Note: Not available
    1. Report
  2. Question: Given the statement var charConvert = toCharCode('x'), what is the error?

    A
    toCharCode() is a bogus method

    B
    Nothing. It will work fine

    C
    toCharCode accepts only numbers

    D
    toCharCode takes no arguments

    Note: Not available
    1. Report
  3. Question: Consider three variables: someText = 'JavaScript1.2'; pattern = /(\w+)(\d)\.(\d)/i; outCome = pattern.exec(someText); What does pattern.global contain?

    A
    true

    B
    false

    C
    undefined

    D
    null

    E
    0

    F
    1

    Note: Not available
    1. Report
  4. Question: The form tag is defined as follows: <form onsubmit="return Validate()" action="http://www.mysite.com/"> The validate() function is intended to prevent the form from being submitted if the name field in the form is empty. What will the validate() function look like?

    A
    <script type="text/JavaScript">
        function Validate()
        {
        if(document.forms[0].name.value == "")
                return true;
        else
            return false;
        }
        </script>

    B
    <script type="text/JavaScript">
        function Validate()
        {
        if(document.forms[0].name.value == "")
            return false;
        else
                return true;
        }
        </script>

    C
    <script type="text/JavaScript">
        function Validate()
        {
        if(document.forms[0].name== "")
                return false;
        else
                return true;
        }
        </script>

    D
    <script type="text/JavaScript">
        function Validate()
        {
        if(document.forms[0].name == "")
                return true;
        else
                return false;
        }
        </script>

    Note: Not available
    1. Report
  5. Question: You want to delete an element from an options array. How would you do it?

    A
    Set it to false

    B
    Set it to null

    C
    Set it to undefined

    D
    Set it to -1

    E
    Set it to 0

    F
    Set it to 1

    Note: Not available
    1. Report
  6. Question: Consider the following variable declarations: Consider the following variable declarations: var a=" adam " var b=" eve " Which of the following would return the sentence " adam and eve "?

    A
    a.concatinate( "and ", b)

    B
    a.concat( "and ", b)

    C
    a.concatinate( " and ", b)

    D
    d. a.concat(" and ", b)

    Note: Not available
    1. Report
  7. Question: Which of the following code snippets is more efficient and why?
    <script language="JavaScript">
            for(i=0;i<document.images.length;i++)
                    document.images[i].src="blank.gif"; 
    </script> 
    
    <script language="JavaScript">
            var theimages = document.images;
            for(i=0;i<theimages.length;i++)
                    theimages[i].src="blank.gif"
    </script>

    A
    Both are equally efficient

    B
    The first code is more efficient as it contains less code

    C
    The first code is more efficient as it employs object caching

    D
    The second code is more efficient as it employs object caching

    Note: Not available
    1. Report
  8. Question: The following statements show two ways of calling a JavaScript function: i)onclick ="a();" ii)onclick="JavaScript:a();" Which of the following options is correct with regard to the above two statements?

    A
    There is no difference between the two statements

    B
    The first statement is incorrect and the second one is correct

    C
    The first statement is correct and the second statement is incorrect.

    Note: Not available
    1. Report
  9. Question: You have written the following function to change the source of an image at runtime: function changeimg(givenImg) { document.getElementById('imageID').src=givenImg } You would like the source of the image to change to "image2.gif" only for the time that the user clicks on the image. Which of the following will you use?

    A
    <img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg(image1.gif)" onmouseup="changeimg(image2.gif)">

    B
    <img id="imageID" src="image1.gif" width="50" height="60" onmouseclick="changeimg(image2.gif)" onmouseup="changeimg(image1.gif)">

    C
    <img id="imageID" src="image2.gif" width="50" height="60" onmousedown="changeimg(image1.gif)" onmouseup="changeimg(image2.gif)">

    D
    <img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg('image2.gif')" onmouseup="changeimg('image1.gif')">

    Note: Not available
    1. Report
  10. Question: Are the following two statements the same? object.property object[''property'']

    A
    Yes

    B
    No

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd