【发布时间】:2010-05-07 04:29:23
【问题描述】:
来自this example的新手ajax问题:
在 xmlhttp.open() 和 xmlhttp.send() 之前如何分配 xmlhttp.responseText ? (如果我们需要 demo_post.asp 中的数据)
我知道它在 onreadystatechange 中,但如果从上到下读取 javascript,我不明白。谢谢,放轻松!
【问题讨论】:
-
我怀疑 .responstText 只是空的
-
@Dormilich:根据 Jack 的提示 - onready..() 的行为只是在这里定义的。它将在 sent() 或任何更改时调用。
标签: javascript html ajax events