Home>

Hello. It is necessary to solve this question:

document.getelementByid ('sec_info'). Innerhtml= '1';

This code changes the contents of the block, Okay, on, I need to calculate, with what condition to do it. And the condition is as follows: when hovering on the block (div) A, we carry out this code (elected). Those. It turns out, speaking by Nubski, the following:

if (onmouseover div a) document.getelementByid ('sec_info'). Innerhtml= '1';

Help solve the problem :) Oh, and yes, a prerequisite is implemented precisely on pure JS, not on jQuery.

  • Answer # 1

    everything is working:

    document.getelementByid ('hover_block'). OnmouseEnter= Function () {
        Document.getelementByid ('sec_info'). Innerhtml= '1'
    }
    

    Fiddle: http://jsfiddle.net/b36nk/1//

  • Answer # 2

    everything is working:

    document.getelementByid ('hover_block'). OnmouseEnter= Function () {
        Document.getelementByid ('sec_info'). Innerhtml= '1'
    }
    

    Fiddle: http://jsfiddle.net/b36nk/1//

  • Answer # 3

    < Div id= "sec_info" > 2 < /div >

    document.getelementByid ('sec_info'). OnmouseEnter= FUNCTION () { this.innerhtml= '1' }

    http://jsfiddle.net/b36nk/

    Thank you so much! Hmm, I was glad early ... non-working code. I needed that when you hover on the block A, the contents of the B. block changed (text)

    Folleah2021-07-09 13:13:30
  • Answer # 4

    < Div id= "sec_info" > 2 < /div >

    document.getelementByid ('sec_info'). OnmouseEnter= FUNCTION () { this.innerhtml= '1' }

    http://jsfiddle.net/b36nk/

    Thank you so much! Hmm, I was glad early ... non-working code. I needed that when you hover on the block A, the contents of the B. block changed (text)

    Folleah2021-07-09 13:13:30