1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. Question: Which of the following cannot be achieved using JavaScript?

    A
    Read or write from external files (except .js files)

    B
    Access or modify browser settings

    C
    Launch client processes (eg windows applications)

    D
    Launching the default email application of the client

    Note: Not available
    1. Report
  7. Question: You want to create a variable called newDate that contains the date February 1 of the current year. Which option will you use?

    A
    var newDate=new Date(today.getFullYear(), 2, 2)

    B
    var newDate=new Date(today.getFullYear(), 1, 1)

    C
    var newDate=new Date(today.getCurrYear(), 2, 1)

    D
    var newDate=new Date(today.getCurrYear(), 1, 1)

    Note: Not available
    1. Report
  8. Question: How would you invoke the browser's Add To Favorite Dialog?

    A
    Use the window.AddFavorite method

    B
    Use the document.AddFavorite method

    C
    Use the window.external.AddFavorite method

    D
    It is not possible using JavaScript

    Note: Not available
    1. Report
  9. Question: How would you use a timer with a function called rearrange()?

    A
    tmr=setTimeout("rearrange ()",1)

    B
    tmr=Timer(1,"rearrange ()")

    C
    tmr=Timer("rearrange ()",1)

    D
    tmr=setTimeout(1,"rearrange ()")

    Note: Not available
    1. Report
  10. Question: Consider the following image definition: <img id="logo" src="companylogo1.gif" height="12" width="12" > How can you change the image to "companylogo2.gif" when the page loads?

    A
    logo.source="companylogo2.gif"

    B
    logo.source="companylogo1.gif"

    C
    document.getElementById('logo').src="companylogo1.gif"

    D
    document.getElementById('logo').src="companylogo2.gif"

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