<form>
<label for="mail">I would like you to provide me an e-mail</label>
<input type="email" id="mail" name="mail">
<button>Submit</button>
</form>
var email = document.getElementById("mail");
email.addEventListener("keyup", function (event) {
if (email.validity.typeMismatch) {
email.setCustomValidity("I expect an e-mail, darling!");
} else {
email.setCustomValidity("");
}
});
.block>img {
transition: all 1s;
max-width: 200px;
max-height: 200px
}
.block>img:hover {
transform: rotate(360deg);
border-radius: 50%
}
<input type="text" oninput="this.value = this.value.replace(/[^0-9]/g, '')">
<table>
<tr>
<td>1</td>
</tr>
</table>
<table>
<tr>
<td>2</td>
</tr>
</table>
<table>
<tr>
<td>3</td>
</tr>
</table>
table {
width: 33.3%;
border: 1px solid black;
float: left;
}
$(function(){
$(document).on('mousewheel DOMMouseScroll', function(event){
var course = event.originalEvent.wheelDelta;
if(course > 0){
console.log("Scroll UP");
}
else{
console.log("Scroll DOWN");
}
});
});