Cross browser AJAX function to dynamically load HTML

后端 未结 6 1668
清酒与你
清酒与你 2021-02-06 12:25

I\'m looking for an AJAX function to dynamically request an HTML page. I already found the following:

function ajaxinclude(url) 
{
   var page_request = false

         


        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 12:53

    I would have to agree, don't go reinventing the wheel, or in this case, AJAX.

    JQuery and Prototype do an excellent job of letting you NOT have to deal with cross-browser support, and greatly simplifying Javascript type programming. I fell into JQuery first so I'm biased towards it, and from what I've seen the library is a little smaller (read: faster in the browser), but Prototype I believe has been around longer and has TONS of plugins and examples out there. Ruby on Rails also by default uses Prototype. Funny enough, the code in both looks very similar and takes little rewriting to change libraries.

    JQuery Tutorials <-- Just head on down to the AJAX section

提交回复
热议问题