19/03/2006 | jiangws2002 博客园 – YAO.NET℡ – Ajax初体验(一): script type=“text/javascript“ defer=“defer“> test.test.onLoading = function(b) { var l = document.getElementById(“loadinfo“); l.style.visibility = b ? “visible“ : “hidden“; } function doTest2() { test.test.getData(document.getElementById(“txtInput“).value, doTest2_callback); } function doTest2_callback(res) { var p = res.value; var layer1 = document.getElementById(“Layer1“); layer1.style.visibility = (p == “”) ? “hidden“ : “visible“; document.getElementById(“Layer1“).innerHTML = p; } script>