jQuery/AJAX - Load content into a div when button clicked?

前端 未结 5 1131
野趣味
野趣味 2021-02-09 04:47

Would someone be able to help here?

I would like to fill a div e.g.

with content from an e

5条回答
  •  佛祖请我去吃肉
    2021-02-09 05:20

    Try the following:

    var myurl = 'myfileonthesamedomain.html';
    
    $('button').click(function(){
        $('div.loadme').load(myurl);
    });
    

提交回复
热议问题