I've got a form and a button outside the form. I want to submit the form using the button, so i have written some jquery code. Everything seems to work fine, except one thing. After submit action button's name and value aren't being send (in this case: page=2). How can I fix it? Thanks in advance for help.
$('button').on('click', function() {
$('#test-form').submit();
});
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<form method="get" action="#" id="test-form">
<input type="text" name="example">
</form>
<button name="page" value="2">2</button>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</body>
<html>