form_func3.php
543 Bytes
<html>
<form method="post" action="main.php">
<input type="button" id="func3" name="func3" class="func-button" value="" onclick="this.form.submit()"/>
<input type="hidden" id="func3" name="func3" value="FUNC3" 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('func3');
var pos_x = pos.x+160;
btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
</script>
</html>