Best Performance + jQuery Ajax + Div Refresh

后端 未结 4 2022
甜味超标
甜味超标 2021-01-16 13:50

Does anyone have good suggestion of the best option for jQuery Ajax to refresh a DIV?

Following are what I\'m trying to achieve:

  1. Optimization of perfor
4条回答
  •  攒了一身酷
    2021-01-16 14:46

    Have one page which includes the menu, and separate pages for all pages you would like to display (without the menu). On a menu item click, send an AJAX request to get the appropriate page (full page html will be returned) and just set that as the html of your div. Just watch out for duplicate element ids/names ans this could cause javascript problems if you aren't careful.

提交回复
热议问题