Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
174 views
in Technique[技术] by (71.8m points)

html - How to display a table from another website using iframe

I am trying to make use of iframe to pick a particular table and the info it's been populated with from a particular website and make it appear on mine. I only need the table to be iframed. Here's the website: https://realnaps.com/signal

I need to pick the just that table that's been populated with the results. Please, is there anyone who can help with this? When I tried iframe it picked the whole webpage but I don't want the whole webpage, I only want the table that is been populated. Thanks in advance.

This is how the table looks like:

table

question from:https://stackoverflow.com/questions/65649915/how-to-display-a-table-from-another-website-using-iframe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You will not be able to embed just a portion of a document in an iframe with just HTML.

You will have to write some JS code to poll that site and extract just the desired content.

But, have you noticed that there is a published websocket? You may also try to get the data via JS: wss://realnaps.com:3000/socket.io/?EIO=3&transport=websocket&sid=tXNlXGWrZl-pipLxAMR_


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...