function showHint() { var obj=document.createElement("div"); document.body.appendChild(obj); obj.id='hint1'; obj.innerHTML="正在那啥。。。请稍候。。。"; obj.innerHTML+="
关闭" obj.style.display="block"; obj.style.position="absolute"; obj.style.width="300px"; obj.style.height="50px"; obj.style.background="#ffcccc"; obj.style.top=(document.body.clientHeight-50)/2; obj.style.left=(document.body.clientWidth-300)/2; } function closeHint() { document.getElementById('hint1').style.display='none'; }
运行时调用showHint()