Javascript scripts enable partial refresh

Source: Internet
Author: User

AJAX is a very familiar word, but it uses very few technologies.
Now I have encountered a function that requires partial refresh. Previously I considered using AJAX technology, but the boss said it didn't take so much time to refresh it all.
I thought of a good way to neither use AJAX nor refresh all.
In fact, AJAX is the application of javascript scripts. The full spelling is: AsynchronousJavaScript + XML.
Ajax is not a technology. It is actually several technologies, each of which has its own unique characteristics. Together, Ajax becomes a powerful new technology.
Ajax includes:
XHTML and CSS
Use the DocumentObjectModel for Dynamic Display and Interaction
Use XML and XSLT for Data Interaction and operations
Use XMLHttpRequest for asynchronous data receiving
Bind them together using JavaScript

So here I don't need to know so much about it, as long as javascript is used.
There is an iframe control in the javascript script, which can insert the content of another web page B to this page.
Can I re-insert the content of page B when page A is already opened?
Of course, you only need to use javascript to get the ID of the iframe control and assign the src attribute of the control to the page where you want to get the data.
In this way, the iframe control reloads the content. At this time, the homepage is not refreshed, but the content of the control has been changed.
The Code is as follows:

<Table width = "100%" height = "60" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<Td height = "60" valign = "top">
<! -- The overview information of the dormitory or (Gate/wall) that the camera belongs to is displayed here -->
<Iframe id = "infoA" enableviewstate = "true" src = "infoA.htm" frameborder = "0" scrolling = "auto" style = "width: 648px; height: 60px; margin: 0px 0px 0px 0px; ">
</Iframe>
</Td>
</Tr>
</Table>

The page content is refreshed
Document. getElementById ("infoA"). src require 'B .htm ';

Under this principle, a lot of local refresh applications can be enriched.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.