有没有可以从另外一个后台页面取数据的数据容器?有例程!

fchyed 2003-08-19 08:23:52
现在有三个文件
1.meiqi.asp

<%@LANGUAGE="VBSCRIPT"%>
<frameset cols="100%,0%">
<frame src="meiqis.htm" name="meiqis">
<frame src="meiqid.asp" name="meiqid">
</frameset>

2.meiqis.htm

<input type="text" name="f201" size="6" >
<input type="text" name="f202"size="6" >

3.meiqid.asp

<%@language="vbscript"%>
<meta http-equiv="refresh"
content="3" content="text/html;
charset=gb_2312-80">
<body>
<script language="vbscript">
<!--
parent.frames("meiqis").f201.value="66"
parent.frames("meiqis").f202.value="67"
-->
</script>
</body>

以上程序调试好了的。在pws中打开meiqi.asp,meiqis.htm即可显示66,67两个数字。
解释如下:
让meiqid.asp 在后台提供数据给meiqis.htm,并三秒刷新一次。如果让meiqis.htm 刷新画面会抖动很厉害,根本无法用。
实际上meiqid.asp的数据是从数据库而来,为了简单我替换成了固定值。

现在的问题是,虽然数据可以在“text"中显示出来,并不停刷新。但是有的时候页面上”text“太多了,到处都是框,很难看。
各位,能不能找另外一个数据容器,替代”text”即可以从meiqid.asp取数据,由没有那个框?????
谢了,找了N长时间也没找到,靠各位了。如果用别的方法也能实现这个功能也可以。
望高手不吝赐教!
...全文
43 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gancen 2003-08-20
  • 打赏
  • 举报
回复
??????I no
awaysrain 2003-08-20
  • 打赏
  • 举报
回复
<textarea name="t1" cols="100" rows="20" id="t1"></textarea>
<script language="vbscript">
Function bytes2BSTR(vIn)

Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
strReturn = ""

For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next

bytes2BSTR = strReturn

End Function
</script>

<script language="JavaScript">
function getXML(URL) {
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("GET",URL, false);
try {
xmlhttp.Send();
var result = xmlhttp.status;
}
catch(e) { return(false); }
if(result==200) { return(bytes2BSTR(xmlhttp.responseBody)); }
var xmlhttp = null;
}

t1.innerText = getXML("http://expert.csdn.net/expert/forum.asp");

</script>
awaysrain 2003-08-20
  • 打赏
  • 举报
回复
use xmlHttp

http://www.csdn.net/develop/Read_Article.asp?Id=13329
lions911 2003-08-20
  • 打赏
  • 举报
回复
可不可以用<div id=xxx></div>

然后通过DIV的ID来控制DIV的VALUE
fchyed 2003-08-19
  • 打赏
  • 举报
回复
????
没人知道?

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧