Сообщение от Deff
|
var bits = document.querySelector('form.form-horizontal input[name="bits"]').value
|
Не работает анимация ну и всё остальное, хотя без
var bits = document.querySelector('form.form-horizontal input[name="bits"]').value;
Всё работает, может ошибка где то здесь.
<?php require_once "session.php";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="https://js.cx/libs/animate.js"></script>
<?php require_once "block/head.php";?>
<style>
#brick {
width: 10px;
height: 20px;
background: #EE6B47;
position: relative;
cursor: pointer;
}
#gammes {
text-align: left;
}
#path {
outline: 1px solid #E8C48E;
width: 100%;
height: 20px;
}
</style>
</head>
<body>
<table width="800" border="0" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" align="center" class="shadow">
<tbody><?php require_once "block/header.php";?>
<tr>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td id="tab-left"> </td>
<td id="tab-middle">Play Free Spin & Win Bitcoin Game</td>
<td id="tab-right"> </td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td align="center">
<span class="startText">Game Balance: </span> <span id="gamebal" class="important2">3819430 Bits</span>
<br>
<span class="startText">Your Balance: </span> <span id="userbal" class="important2"><?php echo $balance;?> Bits</span>
<br><br>
<span class="game-donate-text">Game Balance Direct Deposit: 37JSSzhMBe88vPQf9ZTbAt8qCJa7bxbmiw<br>
(Requires 1 network confirmations before balance is credited - min: 0.001 BTC)</span></td>
</tr>
<tr>
<td align="center"><span class="important2"><h1 id="result">?</h1></span></td>
</tr>
<tr>
<td align="center">
<div id="gammes">
<div id="path">
<div id="brick"></div>
<form method="post" id="ajax_form" action="">
<div>
<span class="important2">0</span>
<span class="important2">25</span>
<span class="important2">50</span>
<span class="important2">75</span>
<span class="important2">100</span>
</div>
</div>
<script>
window.onload = function(){
document.getElementById('button').onclick = function() {
var bits = document.querySelector('form.form-horizontal input[name="bits"]').value;
document.getElementById('userbal').innerHTML=bits;
function randomInteger(min, max) {
var rand = min + Math.random() * (max - min);
rand = Math.round(rand);
return rand;
}
var sum = ( randomInteger(0, 100) )
document.getElementById('result').innerHTML=sum;
animate({
duration: 1000,
timing: function(timeFraction) {
return Math.pow(timeFraction, 2);
},
draw: function(progress) {
brick.style.left = progress * sum + '%';
}
});
};
}
</script>
</div><br /><br />
<div class="footer text-center col-xs-12">
<input id="bits" name="bits" type="text" class="button-x" value="1"><br /><br />
<br />
<input id="button" name="go" type="button" class="button-x"value="Start" >
</form>
</div>
</div>
</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><span class="info-title">Your Bitcoin Game Referral URL:</span><br>
<span class="info-text">Share this link with your friends and earn 10% referral commission on all bitoin game winnings!<br>
http://Payforyou.top/?r=Your_Bitcoin_Address</span></td>
</tr>
<?php require_once "block/footer.php";?>
</tbody></table>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-70355115-1', 'auto');
ga('send', 'pageview');
</script>
</body></html>