jquery isDefaultPrevented () method syntax
The role: whether to call the preventDefault () method on isDefaultPrevented () method returns the specified event object. Marble platform how to
Syntax: event.isDefaultPrevented ()
parameter:
Parameter Description Required event. The provisions of events to check. The event parameters from the event binding function.
jquery isDefaultPrevented () method of Example
<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("a").click(function(event){
event.preventDefault();
alert("Default prevented: " + event.isDefaultPrevented());
});
});
</script>
</head>
<body>
<a href="http://www.php.cn/">php中文网</a>
<P> preventDefault () method will prevent the opening of the link above URL. </ P>
<P> Please click on the link, check that prevents the default action. </ P>
</body>
</html>