在MVC中利用ajax获得页面内容,插入到对应的div中(MVC)

    xiaoxiao2021-12-03  15

    (1)html页面:

    <div class="tab-content" id="framecontent"></div>

    (2)js代码:

    htmlobj=$.ajax({url:"Action方法地址",async:false});

    $('#framecontent').html(htmlobj.responseText);            

    (3)Controller界面

    不需要加Httppost

    public ActionResult  Fun()

    {

    ......

    return PartialView(model);

    }            

    转载请注明原文地址: https://ju.6miu.com/read-680131.html

    最新回复(0)