JS 차단 브라우저 차단 기본 동작의 간단한 인스턴스
<! doctype html> <html> <head> <meta charset = "utf-8"> <title> </title> </head> <a id = "a1"href = "http://www.baidu.com"> baidu </a> <clipt> function stopdefault (e) {// nonie if (e &) e.preventDefault (); // else window.event.returnValue = false; } window.onload = function (e) {var a1 = document.getElementById ( "a1"); a1.onclick = function (e) {stopdefault (e); }}; </script> </body> </html>브라우저의 기본 동작을 차단하는 JS의 위의 간단한 예는 내가 공유하는 모든 컨텐츠입니다. 나는 당신이 당신에게 참조를 줄 수 있기를 바랍니다. 그리고 당신이 wulin.com을 더 지원할 수 있기를 바랍니다.