AJAX, this very familiar word, but with very little technology.
Now I encountered the need for local refresh function, before I consider using AJAX technology, but the boss said that not to spend so much time, directly all flushed.
I thought of a good way to use neither Ajax nor full refresh.
In fact, Ajax is also the application of JavaScript scripts. The whole fight is: Asynchronousjavascript+xml.
Ajax is not a technology, it is actually several technologies, each of which has its own uniqueness, and together it becomes a powerful new technology.
Ajax includes:
XHTML and CSS
Use the Document Object Model (Documentobjectmodel) for dynamic display and interaction
Data interaction and manipulation using XML and XSLT
Using XMLHttpRequest for asynchronous data reception
Use JavaScript to bind them together
So here I don't have to know so much knowledge, as long as the JavaScript will do.
There is an IFRAME control inside a JavaScript script that inserts the contents of another page B into the page A.
Is it possible to insert the contents of page B again when the page A is already open?
Of course, just use JavaScript to get the ID of the IFRAME control and assign the Src property of the control to the page where you want to get the data.
The IFRAME control then reloads the content, and the master page is not refreshed, but the contents of the control have changed.
The code is as follows:
<table width="100%" height="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="60" valign="top">
<!-- 此处显示摄像头所属于宿舍或者(大门/围墙)的概况信息 -->
<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>
Triggers the refresh of page content as
document.getElementById ("Infoa"). src = ' b.htm ';