html post link

Solutions on MaxInterview for html post link by the best coders in the world

showing results for - "html post link"
Malena
17 Oct 2019
1<form name="myform" action="handle-data.php" method="post">
2  <label for="query">Search:</label>
3  <input type="text" name="query" id="query"/>
4  <button>Search</button>
5</form>
6
7<script>
8var button = document.querySelector('form[name="myform"] > button');
9button.addEventListener(function() {
10  document.querySelector("form[name="myform"]").submit();
11});
12</script>
13