<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>测试1</title> </head> <body> <input id="test_input"> <button id = 'testbtn'οnclick="testfunction(1);testfunction2(0);">测试button</button> <script> window.οnlοad= function(){ document.getElementById('test_input').value = "123"; } function testfunction(e){ if(e>0){ location.reload(); return; }else if(e = 0){ } alert("11不应该出现的代码"); return false; } function testfunction2(e){ if(e>0){ location.reload(); return; }else if(e = 0){ } alert("22不应该出现的代码"); } </script> </body> </html>