form_func2.php 542 Bytes
<html>
	<form method="post" action="main.php">
		<input type="button" id="func2" name="func2" class="func-button" value="" onclick="this.form.submit()"/>
		<input type="hidden" id="func2" name="func2" value="FUNC2" class="btn-outline-danger"/>
	</form>
	<script type='text/javascript'>
		var elem = document.getElementById('cam<?php echo $i ?>');
		var pos = elem.getBoundingClientRect();
		var btn = document.getElementById('func2');
		var pos_x = pos.x+80;
		btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
	</script>
</html>