JSブロッキングブラウザのデフォルト動作の単純なインスタンス
<!doctype html> <html> <head> <meta charset = "utf-8"> <title> </head> <body> <a id = "a1" href = "http://www.baidu.com"> baidu </a> <scritivevevault(e){// E.PreventDefault(); // IE 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をもっとサポートできることを願っています。