A problem of code coverage

I get the HTML code of the content area through PHP, including the Js code. Then overwrite it to the div whose id is display

clipboard.png
display

clipboard.png
then I click a button that id is the same for all pages.
then executes two events because different pages perform different functions.
ask why I overwrite the Js code but still execute the previous event. Is
because of caching? How to solve it? Do you have a boss to answer

?
Php
Mar.20,2021

it is useless to overwrite the js code. Js is already running, has been written to memory, and can only be refreshed. I don't know what the covered js is, so I can't help more


    eval()

you can delete the js from the page and write it in the code covered by php. This problem is solved

.
Menu