javascript - I want to load the page using the external url without iframe or object -


I want to load the page from the external URL in the device without the iframe or object, I need an alternative method for this. Can somebody help me out.

This only works when I use iframe or object.

  & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription // N http: //www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Test page & lt; / Title & gt; & Lt; Script src = "https://code.jquery.com/jquery-1.7.2.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("# siteloader"). Load ("https://www.w3schools.com");}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "siteloader" & gt; & Lt; / Div & gt; One ???? & Lt; / Body & gt; & Lt; / Html & gt; As suggested in @dfree gravity's comment, the site (in this case    

w3schools.com Your site will need to allow content to be accessed for security purposes.

If you have access to external sites, you will be able to access, a origins: http : //requestSite.com will be sent from http://w3schools.com , but w3schools.com will return a access-control- the permission- Origin: http://requestSite.com header, but this is the only way I know it's possible (and it's only when you have access to the other's servers, the site you want to load ).

Check out this JSFDC console output, which supports my theory:

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -