Click the button, bomb box

<id = "btn1" / input type = "button" value = " display effect">     
        <Script> // Get The value of the id attribute of this element from the document var btn1Obj = document.getElementById ( "btn1" );
             // the button for the current element (objects), registration click event, add an event handler (anonymous function) 
            btn1Obj.onclick = function () {
                 // response do 
                Alert ( "jaja" ); 
            }; </ Script>
            
            
        

 

Guess you like

Origin www.cnblogs.com/zhangDY/p/11423930.html