SóProvas


ID
183814
Banca
FCC
Órgão
TRE-RS
Ano
2010
Provas
Disciplina
Programação
Assuntos

Em Java Script, são eventos conhecidos como Eventos de Página:

Alternativas
Comentários
  • onblur 
    Desata-se um evento onblur quando um elemento perde o foco da aplicação. O foco da aplicação é o lugar onde está situado o cursor, por exemplo, pode estar situado sobre um campo de texto, uma página, um botão ou qualquer outro elemento. 
    Javascript 1.0 

    onfocus 
    O evento onfocus é o contrário de onblur. Produz-se quando um elemento da página ou a janela ganhamo foco da aplicação. 
    Javascript 1.0 
     

    onunload 
    Ao abandonar uma página, seja porque se clique em um link que nos leva a outra página ou porque se fecha a janela do navegador, se executa o evento onunload. 
    Javascript 1.0

     

    Alternativa E

  •   EVENTOS        DESCRIÇÃO
     
     
    Clik
    Load
    Unload
    MouseOver
    MouseOut
    Focus
    Blur
    Change
    Select
    Submit
     
     
     
    Quando o utilizador clica sobre um botão, um link ou outro elementos.
    Quando a página é carregada pelo browser.
    Quando o utilizador saia da página.
    Quando o utilizador coloca o ponteiro do rato sobre um link ou outro elemento.
    Quando o ponteiro do rato não está sobre um link ou outro elemento.
    Quando um elemento de formulário tem o focus, istoé, que está activo.
    Quando um elemento de formulário perde o focus, isto é, quando o deixa de estar activo.
    Quando o valor de um campo de formulário é modificado.
    Quando o utilizador selecciona um campo dentro de elemento de formulário.
    Quando o utilizador clica sobre o botão Submit para enviar um formulário.
     
     

  • Observando o quadro que o colega incluiu no comentário acima, o que percebo é que os eventos Blur e Focus são referentes a elementos de formulários, não de "página". Os eventos de página seriam apenas Load e Unload. Não é isso não? Alguém com experiência em javascript poderia comentar melhor essa questão?
  • Também não entendi o gabarito da questão.
  • Page Events http://javascript.about.com/library/bltut31.htm

    Onload

    The onload() event handler will run Javascript code that you want to run after everything on the page has finished loading. Unlike Javascript code placed at the very bottom of the web page source which will run after the whole HTML file has loaded but possibly before all of the images finish loading, any Javascript code triggered by the onload event handler will only run after everything needed by the web page including all images, scripts, stylesheets, and multimedia files have finished downloading to your visitors computer and loading into their browser window. To keep the code in the body tag itself short, the onload event handler usually runs a function from the head section of the page which itself contains the Javascript that is to be run after everything on the page is loaded. Here is an example:

    <body onload="initdt(document.myForm);">

    As you can see, in this example a parameter is being passed to the function that refers to some of the web page content. The whole web page needs to have loaded before this function can run otherwise the part of the page referred to by the parameter may not be accessible.

    Onunload

    The other time in the life of a web page where you may want to run some Javascript is when the web page is being unloaded to make way for another web page. The onunload() event handler can be used to run this Javascript code for you.

    The use of the onunload event handler is identical to that of onload except for the timing of when the event handler is triggered. You can of course put both event handlers on the body tag if you require Javascript to run at both times.

    Onresize

    The onresize() event handler is a another that is attached to the body tag like onload and onunload. This event handler is triggered if the page being viewed is resized (ie. the browser window becomes larger or smaller).

    Onscroll

    The onscroll() event handler can also be attached to the body tag. This event handler is triggered every time that the page being viewed is scrolled (either horizontally or vertically). This event handler is supported by most modern browsers (Netscape 6 is the most recent browser that does not support this event).

  • O gabarito não pode estar certo.
    • Eventos de página são: onLoad, onUnload, onResize, onScroll
    • Eventos de formulário (como um todo): onSubmit, onReset
    • Eventos de campos de formulário: onFocus, onBlur, onChange

    Lista completa de eventos: http://www.w3schools.com/jsref/dom_obj_event.asp
  • Galera, falei com dois colegas programadores e um deles confirmou que todos podem ser sim eventos de página, segue o que ele me mandou:


    "exemplo da utilização do onfocus e onblur diretamente na tag body, ou seja, tambem são eventos de pagina: http://www.faqs.org/docs/htmltut/document/bfbtop.html