javascript - how to show the content of other websites in my website -


i looking code simple task. below task

let's site http://www.url.com

i want when user go site see box on top of page shows site name , contact details , countdown timer.

below line want show exact same website of few different url , want set timer these few websites rotate , timer on top shows how long until next refresh , next website. want part of webpage refresh , want top line still.

http://i58.tinypic.com/s6t84h.jpg

you can see want in image above.

i told can done using iframe don't know how , don't want scroll

i appreciate if me

i found solution , seems working. need countdown timer , want crop out let's 200px of top of each website , shift because 1 page doesn't show content want unless using scrolling , don't want that.

    <!doctype html>     <html>     <body>      <div align="center" style="border:4px solid red ">     <div style="color:#0000ff">     <h3>some content<color:#0000ff/h3> <h3>some more content<color:#0000ff/h3> </div>  </div>  <iframe id="rotator" src="http://www.zcast.ir" width="100%" height="600" scrolling="no" border="0" ></iframe>  <script> // start when page loaded window.onload = function() {  var urls = [ "http://www.zcast.ir", "http://www.tgju.org", "http://www.on3.ir",  "http://www.goldinfo.ir", "http://www.zarban.ir", ];    var index = 1;   var el = document.getelementbyid("rotator");    settimeout(function rotate() {      if ( index === urls.length ) {   index = 0; }  el.src = urls[index]; index  = index + 1;  // continue rotating iframes settimeout(rotate, 5000);  }, 5000); // 5000ms = 5s  }; </script>  </body> </html>  

yes absolutely can using iframe

1) set iframe scrolling attribute no:

<iframe src="/default.asp" width="200" height="200" scrolling="no"> </iframe> 

read more: iframe attr (w3schools)

2) settimeout timer: - see more
3) reload iframe parent window - see more

you can use style position:fixed; , top:0; place div on top of page:

<div style="position:fixed;top:0;"> content here </div> 

so thats it! :)


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -