How to add click event to an element?

前端 未结 4 765

I would like to add a click event in plain JavaScript (without using jQuery) to an element like this, so I don\'t have an id but a class:



        
4条回答
  •  甜味超标
    2020-11-27 08:58

    
    
    
    
    Untitled
    
    
     
    
    
    
    

    Heading 1

    This code is inside my div. This code is inside a span inside the div. Link inside the span inside the div. Link inside the div.

    My Paragraph's Heading 2

    My first cell. My second cell. Link inside the cell inside the row inside the table.

    `

提交回复
热议问题