$(document).ready(function () {
$('.solo-numero').keyupon('input', function () {
this.value = (this.value + '').replace(/[^0-9]/g, '');
});
});
<!DOCTYPE html>
<html>
<head>
<meta name="description">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<meta charset="utf-8">
<meta name="viewport">
<title>JS Bin</title>
</head>
<body>
<input type="text" class="solo-numero" name="algo">
</body>
</html>
Espero que te funcione si algo me comentas.