키코드로 막기

 

<script>

     window.onload = function () {
        document.onkeydown = function (e) {
            return (e.which || e.keyCode) != 116;
        };
    }

</script>

[링크 : https://www.aspsnippets.com/.../Disable-F5-Key-Button-and-browser-refresh-....aspx]

[링크 : https://www.c-sharpcorner.com/blogs/disable-f5-key-button-and-browser-refresh]

[링크 : https://zetawiki.com/wiki/웹브라우저_백스페이스,_F5_입력_막기]

 

1. window.onbeforeunload (calls on Browser/tab Close & Page Load)

2. window.onload (calls on Page Load)

[링크 : https://stackoverflow.com/questions/8013429/how-do-i-detect-a-page-refresh-using-jquery]

'Programming > javascript & HTML' 카테고리의 다른 글

Math.min.apply()  (0) 2023.02.07
web 렌더러 벤치마크  (0) 2022.12.22
cose network graph  (0) 2019.06.03
HTTP 302 redirect  (0) 2019.04.26
closure  (0) 2019.04.24
Posted by 구차니