javascript - How to jQuery for Call div from other website -
i have questen
how call div other website usng javascrpt
i have page : https://yuyunxp.github.io/share/index.html
then, wan call <div id="testa">
in other page
otherpage.html
jquery(function($){ $('#testa').load('https://yuyunxp.github.io/share/index.html'); });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <html> <head> </head> <body> <div id="testa"></div> </body> </html>
but got error page. hehe..
i dont know why page error..
please sir, can u me.. ?
ps :)
testa
id, need use #
selector:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <html> <head> <script type="text/javascript"> jquery(function($){ $('#testa').load('https://yuyunxp.github.io/share/index.html'); }); </script> </head> <body> <div id="testa"></div> </body> </html>
Comments
Post a Comment