document.getElementById("btnConnect").value = "连接中"; Connect(); // 很耗时的操作 document.getElementById("btnConnect").value = "已连接";
document.getElementById("btnConnect").value = "正在连接"; setTimeout("Connect()", 1);