javascript - Loading HTML from a url using script tags -
here simple html code. i'm trying data(html) url: https://test.bhavukjain.com. contains html code. want data url , pass myfunction(), want extract data fetched html. possible so? don't want use ajax.
<!doctype html> <html> <head> <script> var scriptloaded = false; function myfunction (data) { alert("data"); // var stringdata = json.stringify(data) // document.getelementbyid('response').innerhtml = stringdata; } </script> <script type="text/html" src="https://test.bhavukjain.com/?callback=myfunction()" onload="scriptloaded=true;"></script> </head> <body> <p>my test page!</p> </body> </html>
Comments
Post a Comment