Exemple #1
0
    $_SESSION['time'] = 0;
}
?>
<form action="" method="post" class="form-inline text-center" role="form" style="padding-bottom: 20px;"s>
	<div class="form-group">
		<input name="your" class="form-control" type="number" id="your" autofocus="autofocus" <?php 
enter_num_only();
?>
 />
	</div>
	<div class="form-group">
		<button type="button" name="submit" class="<?php 
echo get_btn();
?>
" onclick="<?php 
echo use_ajax('guess', 'your');
?>
">猜猜看</button>
	</div>
	<div class="form-group">
		<button type="submit" name="rerand" class="<?php 
echo get_btn();
?>
">換一個數字</button>
	</div>
</form>
<div id="result"></div>
<?php 
if (isset($_POST['rerand'])) {
    //如果按下「換一個數字」
    rand_num();
Exemple #2
0
<form class="form-inline text-center" action="" method="POST" role="form">
	<div class="form-group">
		<button type="button" class="<?php 
    echo get_btn('success');
    ?>
" name="true" id="true" onclick="<?php 
    echo use_ajax('level', '', 'true');
    ?>
">存在</button>
	</div>
	<div class="form-group">
		<button type="button" class="<?php 
    echo get_btn('warning');
    ?>
" name="false" id="false" onclick="<?php 
    echo use_ajax('level', '', 'false');
    ?>
">不存在</button>
	</div>
	<div class="form-group">
		<button type="button" class="<?php 
    echo get_btn('info');
    ?>
" name="restart" id="restart" onclick="<?php 
    echo use_ajax('level', '', 'restart');
    ?>
">重新開始</button>
	</div>
</form>
<?php 
}
Exemple #3
0
<form class="form-inline centerd text-center" action="" method="POST" role="form" style="width: 500px;">
	<div class="form-group">
		<div class="centerd input-group">
			<span class="input-group-addon">總數</span>
			<input type="number" class="form-control" name="number" id="number" value="<?php 
echo $_SESSION['number'];
?>
" autofocus="autofocus" <?php 
enter_num_only();
?>
 />
		</div>
	</div>
	<br /><br />
	<div class="form-group text-center">
		<div class="text-center">
			<button type="button" class="<?php 
echo get_btn('primary btn-lg');
?>
" onclick="<?php 
echo use_ajax('draw', 'number');
?>
">抽吧</button>
		</div>
	</div>
</form>
<br /><br />
<div id="result"></div>
<?php 
get_footer();