HTML5 loading a
content into a main view wrapper?

前端 未结 3 1400
星月不相逢
星月不相逢 2021-01-25 23:17

I am no stranger to front-end development, but I have come across a requirement by a client which I have never done before, and I would appreciate it if someone can point me int

3条回答
  •  不思量自难忘°
    2021-01-25 23:28

    I'm not clear about what part you're having trouble with. Are you able to use ajax to dynamically load the content? Something like this (http://api.jquery.com/jQuery.ajax/):

    $.ajax({
      url: 'ajax/test.html',
      success: function(data) {
        $('#mycontent').html(data);
      }
    });
    

    If you aren't allowed to use ajax, how about an iframe and using the target attribute on yoru links?

    Or are you just having trouble with the CSS and getting the dynamic content to overflow correctly?

提交回复
热议问题