- 论坛徽章:
- 0
|
原帖由 chenyan1206 于 2007-2-15 13:49 发表
用perl写的cgi ,按住F5刷新,不一会系统的cpu就老高的,怎么解决这个问题呢?
Hi,
"F5" for webbrowser has usually the "refresh" function for the current
webpage. For disable this key on the client side, you can write a
javascript in your CGI.
For example:
- <script language=javascript>
- document.onkeydown = function(){
- if (window.event && window.event.keyCode == 116) {
- // Capture and remap F5
- window.event.keyCode = 505;
- }
- if (window.event && window.event.keyCode == 505) {
- // New action for F5
- return false;
- }
- }
- </script>
复制代码
-- ulmer |
|