1. Question: Consider the three variables: someText = 'JavaScript1.2'; pattern = /(\w+)(\d)\.(\d)/i; outCome = pattern.exec(someText); What does outCome[0] contain?

    A
    true

    B
    false

    C
    JavaScript1.2

    D
    null

    Note: Not available
    1. Report
  2. Question: You want to keep track of when the user highlights text within a text or textarea object. Which event would you use?

    A
    onSelect

    B
    onBlur

    C
    onChange

    D
    onMove

    Note: Not available
    1. Report
  3. Question: How would you check whether the variable vRast exists or not?

    A
    if (typeof vRast="undefined") {}

    B
    if (typeof vRast =="undefined") {}

    C
    if (vRast.defined =true) {}

    D
    if (vRast.defined ==true) {}

    Note: Not available
    1. Report
  4. Question: Which of the following shortcuts can be used for writing multiple document.write statements?

    A
    for(document){}

    B
    with(document) {}

    C
    This(document){}

    D
    None of the above

    Note: Not available
    1. Report
  5. Question: Given the following window.open function: window.open(url,name,"attributes") How will you ensure that different urls are opened in the same window?

    A
    The second attribute, name should be the same

    B
    The name attribute should be null

    C
    The name attribute should be omitted

    D
    The name attribute should be different

    Note: Not available
    1. Report
  6. Question: Which of the following is not a valid JavaScript function?

    A
    apply()

    B
    call()

    C
    toString()

    D
    All of the above are valid

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

    A
    true

    B
    false

    C
    undefined

    D
    null

    Note: Not available
    1. Report
  8. Question: You are allowing the user to upload image files. You want to be able to capture the attributes of the image such as width and height using JavaScript. How would this be possible?

    A
    It is not possible using JavaScript

    B
    You would use the Image object such as var img = new Image

    C
    You would use the Img object

    D
    This is possible only on the server side using a component

    Note: Not available
    1. Report
  9. Question: You need to be able to determine which page of the web site has been the most recently modified. Which object would enable you to do this?

    A
    document

    B
    window

    C
    history

    D
    browser

    Note: Not available
    1. Report
  10. Question: Consider the following JavaScript function to change the color of the text box named ''txtName'': function color(col) { document.forms[0].txtName.style.background=col } You want that the color of the text box should change to green only while the user is pressing a key?

    A
    <input type=''text'' onkeypress=''color('green')'' onkeyup=''color('white')'' name=''txtName''>

    B
    <input type=''text'' onkeydown=''color('white')'' onkeyup="color('green')'' name=''txtName''>

    C
    <input type=''text'' onkeydown=''color('green')'' onkeyup=''color('white')'' name=''txtName''>

    D
    <input type=''text'' onkeydown=''color('green')'' name=''txtName''>

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