topic description
in the following code, without changing the execution position of $("body"). Append ("bbb");, the output is changed from "bbbaaa" to" aaabbb".
.sources of topics and their own ideas
the title comes from: Xiyanghui
my own idea of solving the problem:
related codes
/ / displays as bbbaaa after execution. It is required to change the way this code is written (the function remains the same) so that the display result becomes aaabbb. However, the execution position of $("body"). Append ("bbb"); cannot be adjusted and must be placed at the end of the main function.
$(function () {
$.get( "test.php", function( data ) {
$( "body" ).append( "aaa" );
});
$("body").append("bbb");
});