My goal is to delete item from db using html. Below is my code and wanted to know if I can pass the JS function or variable directly into html submit form?
<script>
function getstring() {
document.getElementById("xyz");
}
</script>
html
<form action="delete.php" method="post">
<input type="submit" name="Test" value="getquery()"/>
</form>
my question maybe confusing, but all I want to do is call the JS function or variable when clicking submit.