Показать сообщение отдельно
  #15 (permalink)  
Старый 26.12.2015, 20:59
Аспирант
Отправить личное сообщение для serebann Посмотреть профиль Найти все сообщения от serebann
 
Регистрация: 22.12.2015
Сообщений: 38

Сообщение от Deff Посмотреть сообщение
Вы же сменили код формы !
Теперь наверно
var bits = document.querySelector('#ajax_form 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">&nbsp;</td>
            <td id="tab-middle">Play Free Spin &amp; Win Bitcoin Game</td>
            <td id="tab-right">&nbsp;</td>
          </tr>
        </tbody></table></td>
  </tr>
  
  <tr>
    <td align="center">
<span class="startText">Game Balance:&nbsp;&nbsp;</span> <span id="gamebal" class="important2">3819430 Bits</span>
<br>
<span class="startText">Your Balance:&nbsp;&nbsp;</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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<span class="important2">25</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<span class="important2">50</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<span class="important2">75</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<span class="important2">100</span>
</div>
</div>









<script>

window.onload = function(){


document.getElementById('button').onclick = function() {
var balanc = '<?php echo $balance;?>';


var newbalance = balanc - bits;

document.getElementById('userbal').innerHTML=balanc;


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 />

<table align="center">
<tr>
<td>
<select>
<option type="text" name="m25">Less than 25 Profit 3x</option>
<option type="text" name="m50">Less than 50 Profit 2x</option>
<option type="text" name="b50">More than 50 Profit 2x</option>
<option type="text" name="b75">More than 75 Profit 3x</option>
</select>
</td>
</tr>
</table>
<br />
<input id="button" name="go" type="button" class="button-x"value="Start" >

</form>

 

</div>

</div>


            </td>
  </tr>
  <tr>
    <td align="center">&nbsp;</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>
Ответить с цитированием