javascript - how to copy div content to another page

前端 未结 4 1280
心在旅途
心在旅途 2021-01-01 08:03

I would like to make an automatic copy of a div content from page 1 an paste it in a div on page 2 ? What\'s the best, easiest way to achieve this ?

4条回答
  •  难免孤独
    2021-01-01 08:51

    I think the easiest way to do this is using an Iframe. YOu just view the contents of page1 and display it at page2.

    A quick example:

    
    

    This is one 'simple' solution. But ofcourse there are other methods. This solution is easy because you don't need jquery.

提交回复
热议问题