Created
February 6, 2017 23:42
-
-
Save postman31/ebbf9e95a3c99374045f45c2774c5e60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style media="screen"> | |
.red { | |
background-color: #F55D5B; | |
padding: 30px; | |
} | |
.bordered { | |
border: 2px solid #518CB6; | |
} | |
.blue { | |
padding: 30px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="red"> | |
<button class="button"> | |
click me! | |
</button> | |
</div> | |
<div class="bordered" id="someId"> | |
<form class="blue" id="form"> | |
<button class="button"> | |
click me! | |
</button> | |
</form> | |
</div> | |
<div class="red" id="second"> | |
<button class="button"> | |
click me! | |
</button> | |
</div> | |
<div id="output"> | |
</div> | |
<script type="text/javascript"> | |
function stopDefAction(evt) { | |
evt.preventDefault(); | |
} | |
document.getElementById('form').addEventListener( 'submit', stopDefAction, false ); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment