Any way to shuffle content in multiple div elements

前端 未结 8 1107
鱼传尺愫
鱼传尺愫 2020-12-31 23:32

I\'m relatively new to Javascript and was wondering if there\'s a quick way to shuffle content that is contained in multiple

tags. For example

8条回答
  •  鱼传尺愫
    2021-01-01 00:15

    I would suggest you randomize the content, not the actual Divs themselves. You could accomplish this by putting the content in separate html pages - no header info or body, just the content.

    Then use a function on page load to randomly assign which div gets what content and use this to change the DIV's content:

    
    

提交回复
热议问题