How to submit a form on a tag click

{ // deep_execution_view
const authorName = "Ankit Agrawal";
//
const publishDate = "July 15, 2015";
<form id="myDemoForm" action="" method="post">
<label>Name :</label>
<input type="text" name="name" />
<a href="javascript:void(0);" onclick="document.getElementById('myDemoForm').submit();">Submit Form</a>
</form>
}