我想問我怎樣才能使用我自己的值進度欄,這將顯示多少信用度,直到您預設的最大預算? 輸入類型是文本,看看是否有值。進度條有一些進展,但那是因爲我手動輸入了兩個值。 http://postimg.org/image/fbjnrvvgn/jQuery的進度欄與PHP變量
CODE:
<input type="text" id="max_budget" value="<?php include_once 'budget_calc.php'; echo $max_budget_echo; ?>">
<input type="text" id="calculated_budget" value="<?php include_once 'budget_calc.php'; echo $total ?>">
<script>
$(function() {
$("#progressbar").progressbar({
max: 1000,
value: 100
});
});
</script>
<div id="progressbar"></div>
我想有從用戶設定最大最大的數據庫和價值$計算的總= $ I-$ O, 這樣的:
<script>
$(function() {
$("#progressbar").progressbar({
max: $('#max_budget').val(),
value: $('calculated_budget').val()
});
});
</script>
我也累了這個:
<script>
var max_budget=<?php include_once 'budget_calc.php'; echo $max_budget_echo; ?>
var calculated_budget=<?php include_once 'budget_calc.php'; echo $total; ?>
$(function() {
$("#progressbar").progressbar({
max: max_budget,
value: calculated_budget
});
});
</script>
但nothig作品:( 我該如何解決這個問題? 謝謝您的時間(:
感謝您的幫助。有效, – nyler 2014-11-03 15:39:54