Wednesday, 2 March 2016

Send form data in hidden on anchor click Using JavaScript

<form action ="actionpagename.php" id="testform" method="post">
<input type="hidden" name="name" value="dgegg" />
<input type="hidden" name="id" value="adfdsafe" />
</form>

<a class="your class" onclick="test()">Your Links</a>

<script type="text/javascript">
function test()
{
document.forms.testform.submit();
}
</script>

No comments:

Post a Comment