html页面中使用iframe,iframe加载后获取页面内容的请求地址

  1. //<iframe onload="contentLoadstart()" id="content_iframe"></iframe>
  2. function contentLoadstart() {
  3. //获取iframe内容的请求地址
  4. var url = $("#content_iframe")[0].contentDocument.URL;
  5. //获取iframe内容title
  6. var name = $("#content_iframe")[0].contentDocument.title;
  7. }
  8. //iframe 内重新加载一个新的地址的
  9. window.location.replace(src);