javascript - Getting a part of another webpage using jQuery $.post() method -
i know load() method jquery can 1 part based on class or id of element this:
$( "#result" ).load( "ajax/test.html #container" );
this load content in #container. i'm looking post method, post data page, data used change #container element , want display what's in element.
is way do?
thanks.
$.post("some_url", function(data) { var container = $(data).filter("#container"); $( "#result" ).html(container); });
btw, use $.get() instead of $.post()
added: using $.get(),
$.get( "some_url", function( data ) { var container = $(data).filter("#container"); $( "#result" ).html(container); });
Comments
Post a Comment