JQuery uses the load () method to load the specified tag content in another webpage file to the div tag.
This article describes how jQuery uses the load () method to load the specified tag content in another webpage file to the div tag, involving the usage tips of the load method in jQuery, it has some reference value. For more information, see
This example describes how jQuery uses the load () method to load the specified tag content in another webpage file to the div tag. Share it with you for your reference. The specific analysis is as follows:
Inside the div label of the cursor
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<! DOCTYPE html> <Html> <Head> <Script src = "js/jquery. min. js"> </Script> <Script> $ (Document). ready (function (){ $ ("Button"). click (function (){ $ ("# Div1"). load ("demo_test.txt # p1 "); }); }); </Script> </Head> <Body> <Div id = "div1"> <Button> change external content </button> </Body> </Html> |
I hope this article will help you with jQuery programming.