比方说,我有一个锚标记,如 <a href="#" ng-click="do()">Click</a> 如何防止浏览器在AngularJS中导航到#号?
这有什么问题? HTML: <form action="http://localhost:8888/bevbros/index.php/test" method="post" accept-charset="utf-8" id="cpa-form" class="forms"> <input type="text" name="zip" value="Zip code" id="Zip" class="required valid"> <input type="submit" name="Next" value="Submit" class="forms" id="1"> </form> jQuery的: $("#cpa-form").submit(function(e){ e.preventDefault(); });