How do I make load only on a button click?

后端 未结 3 1461

Friends, My issue is that my page is really slow to load, because all of the load simeltaneously. I am pulling an RSS feed that if you click on the \"article\" button it w

3条回答
  •  梦毁少年i
    2020-12-28 09:34

    First, you don't have an element $('#gogogo'). The frame is #gogo.

    Second, set it's src not href

    $("#myframe").attr('src', 'http://site.com');
    

    If you just want to set it to some HTML and not a URL, use this:

    $("#myframe").contents().find('html').html("hello");
    

    Here's a demo

提交回复
热议问题