The following are three methods that use ASP to refresh the page to take data. Of course, the suffix name of the data can be .ASP, .jsp, etc.
1. 1.
<script language = javascript>
Function loadxml (url) {
var loxml = new activexobject (msxml.Document);
loxml.async = false;
loxml.load (url);
Return loxml.xml;
}
</script>
<input type = Button value = loadxml method onCLICK = alert (loadxml ('data.txt'))>>
--Data.xml --- // The data is XML format
<xml/>
2.
<input type = Button value = loadjs method onClick = loadjs ('data.js')>
<script ID = getNewtext> </Script>
<script language = javascript>
Function loadjs (url) {
getNewtext.src = url;
}
Function setdata (s) {
alert (s)
}
</script>
--Data.js --- // The data is the variable of the JS script or the result directly to obtain the result
setdata (ABC);
3..
<input type = Button value = loadframe method onClick = loadframe ('data.html')>
<script language = javascript>
function loadframe (url) {
document.all.getdata.src = url;
}
Function setdata (s) {
alert (s)
}
</script>
<iframe id = getdata style = 'display: none;'> </iframe>
--Data.html--
<script>
Parent.setdata (ABC)
</script>