<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<script type='text/javascript'>
var t_arz1;
var t_tool1;
var t_arz2;
var t_tool2;
</script>
<center>
<table><tr><td>
<button type="button" id="up_down1" style=" font-size:20px; " onclick="accelerate(-1)">up</button>
<button type="button" id="middle" style=" font-size:12px; " onclick="accelerate(0)">stop</button>
<button type="button" id="up_down2" style=" font-size:20px; " onclick="accelerate(1)">down</button>
</td></tr><tr><td>
<button type="button" id="take_off" style=" font-size:12px; " onclick="start(1)">exit</button>
</td></tr>
</table>
</center>
<script>
function myFunction13() {
document.getElementById('up_down1').style.width = t_arz1;
document.getElementById('up_down1').style.height = t_tool1;
document.getElementById('up_down2').style.width = t_arz1;
document.getElementById('up_down2').style.height = t_tool1;
document.getElementById('middle').style.width = t_arz2;
document.getElementById('middle').style.height = t_tool2;
}
document.getElementById('up_down1').style.width = window.innerWidth/ 3;
document.getElementById('up_down1').style.height = window.innerHeight/ 6;
document.getElementById('up_down2').style.width = window.innerWidth/ 3;
document.getElementById('up_down2').style.height = window.innerHeight/ 6;
document.getElementById('middle').style.width = window.innerWidth/ 5;
document.getElementById('middle').style.height = window.innerHeight/ 10;
</script>
<center><h2>
<form id='myform' action="<?php echo $_SERVER['PHP_SELF']; ?>" method = 'POST'>
<center>
<p>tool va arze dokmeh ra bedahid </p>
<table border=1>
<tr>
<td id='h1' >tool va arze dokmeye up and down radif aval ? :
arz: <input id="up_down_arz" value="100" style=" font-size:20px; height:40px; width:120px;" >
</td>
<td id='h2' >
tool: <input id="up_down_tool" value="100" style=" font-size:20px; height:40px; width:120px;" >
</td>
</td>
</tr>
<tr>
<td id='h5' > baghie dokmeh ha ?
arz: <input id="baghi_arz" value="100" style=" font-size:20px; height:40px; width:120px;" >
</td>
<td id='h5' >
tool: <input id="baghi_tool" value="100" style=" font-size:20px; height:40px; width:120px;" >
</td>
</tr>
<tr>
<td id='h5' colspan='4' >
<center>
</center>
</td>
</tr>
<tr>
<td colspan='2' >
masalan size dokmeh ra 2 ta 30 bedahid<br>
</td>
</tr>
</table>
</center>
<button type="button" style=" font-size:16px; height:70px; width:250px;" onclick="myFunction11()">taghire size dok mehaye bazi</button>
<script>
function myFunction11() {
arz1=document.getElementById("up_down_arz").value;
t_arz1=arz1;
tool1=document.getElementById("up_down_tool").value;
t_tool1=tool1;
arz2=document.getElementById("baghi_arz").value;
t_arz2=arz2;
tool2=document.getElementById("baghi_tool").value;
t_tool2=tool2;
myFunction13();
}//func
</script>
</form>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<script type='text/javascript'>
var t_arz1;
var t_tool1;
var t_arz2;
var t_tool2;
</script>
<button type="button" id="up_down1" style=" font-size:20px; " onclick="accelerate(-1)">up</button>
<button type="button" id="middle" style=" font-size:12px; " onclick="accelerate(0)">stop</button>
<button type="button" id="up_down2" style=" font-size:20px; " onclick="accelerate(1)">down</button>
<button type="button" id="take_off" style=" font-size:12px; " onclick="start(1)">exit</button>
<script>
function myFunction13() {
document.getElementById('up_down1').style.width = t_arz1;
document.getElementById('up_down1').style.height = t_tool1;
document.getElementById('up_down2').style.width = t_arz1;
document.getElementById('up_down2').style.height = t_tool1;
document.getElementById('middle').style.width = t_arz2;
document.getElementById('middle').style.height = t_tool2;
}
document.getElementById('up_down1').style.width = window.innerWidth/ 3;
document.getElementById('up_down1').style.height = window.innerHeight/ 6;
document.getElementById('up_down2').style.width = window.innerWidth/ 3;
document.getElementById('up_down2').style.height = window.innerHeight/ 6;
document.getElementById('middle').style.width = window.innerWidth/ 5;
document.getElementById('middle').style.height = window.innerHeight/ 10;
</script>
<form id='myform' action="<?php echo $_SERVER['PHP_SELF']; ?>" method = 'POST'>
arz: <input id="up_down_arz" value="100" >
tool: <input id="up_down_tool" value="100" >
arz: <input id="baghi_arz" value="100" >
tool: <input id="baghi_tool" value="100" >
<button type="button" onclick="myFunction11()">taghire size dok mehaye bazi</button>
<script>
function myFunction11() {
arz1=document.getElementById("up_down_arz").value;
t_arz1=arz1;
tool1=document.getElementById("up_down_tool").value;
t_tool1=tool1;
arz2=document.getElementById("baghi_arz").value;
t_arz2=arz2;
tool2=document.getElementById("baghi_tool").value;
t_tool2=tool2;
myFunction13();
}//func
</script>
</form>
</body>
</html>
<form>
<form method = 'POST'>
action="<?php echo $_SERVER['PHP_SELF']; ?>"
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<script type='text/javascript'>
var t_arz1;
var t_tool1;
var t_arz2;
var t_tool2;
</script>
<form id='myform' action="<?php echo $_SERVER['PHP_SELF']; ?>" method = 'POST'>
arz: <input id="up_down_arz" value="100" >
tool: <input id="up_down_tool" value="100" >
arz: <input id="baghi_arz" value="100" >
tool: <input id="baghi_tool" value="100" >
<button type="button" onclick="myFunction11()">taghire size dok mehaye bazi</button>
<script>
function myFunction11() {
arz1=document.getElementById("up_down_arz").value;
t_arz1=arz1;
tool1=document.getElementById("up_down_tool").value;
t_tool1=tool1;
arz2=document.getElementById("baghi_arz").value;
t_arz2=arz2;
tool2=document.getElementById("baghi_tool").value;
t_tool2=tool2;
}//func
</script>
</form>
</body>
</html>
</form>
var total_s=0;
var s=1; // Speed
var frameNo=0;
total_s+=s;
if (total_s == 1 || everyinterval2(501/s)) {
function everyinterval(n) {
if ((frameNo / n) % 1 == 0) {return true;}
return false;
}
function everyinterval2(n) {
if ((total_s / n) % 1 == 0) {return true;}
return false;
}
function speed1(n)
{
var z=1;
if (s<10 && z==1) { s=s+1; z=0 }
if (s==10 && z==1) {s=20; z=0 }
if (s==20 && z==1 ) { s=30; z=0 }
if (s==30 && z==1 ) { s=40; z=0 }
if (s==40 && z==1 ) { s=50; z=0 }
if (s==50 && z==1 ) { s=60; z=0 }
if (s==60 && z==1 ) { s=100; z=0 }
if (s==100 && z==1 ) { s=200; z=0 }
if (s>100 && z==1 ) {s=s+50; z=0 }
}//my_speed
function speed2(n)
{
var z=1;
if (s>100 && z==1 ) {s=s-20; z=0}
if (s>50 && s<100 && z==1 ) {s=s-10; z=0}
if (s==100 && z==1 ) {s=80; z=0}
if (s==50 && z==1 ) {s=40; z=0}
if (s<50 && s>10 && z==1 ) {s=s-10; z=0}
if (s==10 && z==1 ) {s=9; z=0}
if (s<10 && z==1 ) {s=s-1; z=0}
}//my_speed
function my_speed(n)
{
if (n==0) s=1;
}//my_speed
<button type="button" id="speed1" style=" font-size:12px; " onclick="speed2(1)">down</button>
<button type="button" id="speed0" style=" font-size:12px; color:red; " onclick="my_speed(0)">stop</button>
<button type="button" id="speed2" style=" font-size:12px; " onclick="speed1(1)">up</button>
const randomColor = "#" + Math.floor(Math.random() * 16777215).toString(16);