$(document).ready(function($) {
$('button.print').click(function(e) {
window.print();
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<html>
<head>
</head>
<body>
<button class="print">Print this page</button>
</body>
</html>
How can I print with this code, for both android and iOS. Is there any solution in JavaScript and/or JQuery ?