I have one form data.php with following form structure.
<div id="form-container" style="padding-top: 10px; padding-bottom: 10px;">
var x=Math.random();;
if(x > 0.5)
{
submit form
}
<p style="width: 100%; text-align: right;"><button type="button" id="submit-button">Sumit</button></p>
How form can be automatically submitted based on x value? Which means button should be pressed automatically.