This div displayed when the link was clicked. Whenever the link is clicked, the display of the two divs are swapped. Every time the link is clicked, the divs are swapped. The two divs need to be next to each other, one above the other. In this example, i will give you two example of angular toggle element on click. Change URL Without Reloading Page Using jQuery The basic syntax of this method can be given with: $ ( selector ).load ( URL, data, complete ); The parameters of the load () method has the following meaning: Upon clicking each button, the div content should change, but it does not. Below are the image tag with src and ID. Html. Changing CSS styling with React onClick() Event ')"> Click me to replace the content in the container. 使用onclick更改div内容 Change div content with onclick user3322081 2014-07-31 04:49:57 304 7 javascript/ jquery/ html/ css. This method has broad browser support. Inside our event handler function, we changed the text of our “message” div by using JQuery’s text method. 27. user3322081 So i've been stuck with this problem for hours now... actually almost a day already. change div content with click event. Div on Button Click Tryit