Copy Current Webpage Into a New Window

前端 未结 4 1149
有刺的猬
有刺的猬 2020-12-03 08:28

I need to be able to copy the current webpage into a new popup window for a print preview. There is a grid on the page with children, so if they expand one of the rows to s

4条回答
  •  佛祖请我去吃肉
    2020-12-03 08:45

    Are you just hiding/showing your rows with display:none;? How are you loading up the popup page? If you're reloading the page again, you could use AJAX to pass a dataset to the target page.

    Assign a unique ID to each row, and for each row that is expanded, add the row's ID into an array. Pass that array or object as a data member via AJAX when your print preview function is called, then expand the applicable rows in your onsuccess callback function after the page is loaded.

提交回复
热议问题