狀態欄顯示頁面的點擊效數 - 中國WEB開發者網絡 (http://www.webasp.net) -- 網頁特效 (http://www.webasp.net/javascript/) --- 狀態欄顯示頁面的點擊效數 (http://www.webasp.net/javascript/1/191.htm) |
| -- 發佈日期: 2004-06-17 |
| <!-- 網頁特效代碼由[中國WEB開發者網絡:http://www.ChinaWebDev.com]提供! --> <!-- 要實現此效果需要 2 個步驟: --> <!-- 第 1 步: --> <!-- 把下面的代碼加到<HEAD></HEAD>區域中: --> <script> var count=0 function clickcount(){ count++ if(count==10){ showlink() } status=count } function showlink(){ var link="<a href=http://www.webasp.net/>中國WEB開發者網絡</a>" if(document.all){ document.all.hiddenlink.innerHTML=link }else if(document.layers){ with(document.layers["hiddenlink"].document){ open() writeln(link) close() } }else if(document.getElementById){ document.getElementById("hiddenlink").innerHTML=link } } if(document.layers){ document.captureEvents(Event.CLICK) } document.onclick=clickcount </script> <!-- 第 2 步: --> <!-- 把下面的代碼加到<BODY></BODY>區域中: --> <p>點擊頁面看一下效果,點到10下,會有東東跑出來喲.</p> <div id=hiddenlink></div> |
| webasp.net |