【发布时间】:2011-11-02 17:04:57
【问题描述】:
我的代码使用 SetTimeout 函数写入文本框并显示不同的文本行。但是每次写入时,它都会用新文本替换原始文本。我真正想要的是它继续在新行上书写。我对javascript很陌生,所以我需要一些帮助。到目前为止,这是我的代码:
putftp.onclick = function () {
var Text = document.getElementById("TextBox");
function firsttext() {
Text.innerHTML = "This is the first test.";
setTimeout(secondtest, 3000);
}
function secondtest() {
Text.innerHTML = "This is the second test.";
setTimeout(thirdtest, 5000);
我希望输出是
这是第一次测试。
这是第二次测试。
而不是
这是第二次测试。
任何帮助将不胜感激!
【问题讨论】:
标签: javascript asp.net visual-studio textbox