Ask for advice: how to display data on a page to a modal-body of modal

  node.js, question

Click on the button to generate a dynamically formed web page with json data. I want to click on the button to pop up modal. The data on the dynamic web page is displayed on modal-Body. What should I do? Ask for advice.

First, get the data from the web page, then you can splice the html or use the template engine to generate the html to be displayed on the modal-body, and finally append to the modal-body