@wallstreet <select multiple="multiple" name="price[]" id="sel_1">
<option value="0"></option>
<option value="10">2015</option>
<option value="15">2016</option>
</select>
<span id="usertotal"> </span>var $total = $('#usertotal');
$('input,select').change(function () {
var tot = 0;
$('input:checkbox:checked, select > option:selected').each(function () {
var per_op = $(this).attr('value');
if (per_op) {
tot += Number(per_op);
}
});
var final_result = tot.toFixed(2);
$total.html(final_result)
});Demo
hocam süper teşekkür ederim saintxx arkadaşada teşekkürlerimi borç bilirim
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 15:43:36 -->-> Daha önceki mesaj 15:36:36 --
@wallstreet <select multiple="multiple" name="price[]" id="sel_1">
<option value="0"></option>
<option value="10">2015</option>
<option value="15">2016</option>
</select>
<span id="usertotal"> </span>var $total = $('#usertotal');
$('input,select').change(function () {
var tot = 0;
$('input:checkbox:checked, select > option:selected').each(function () {
var per_op = $(this).attr('value');
if (per_op) {
tot += Number(per_op);
}
});
var final_result = tot.toFixed(2);
$total.html(final_result)
});Demo
hocam çıkan sonucu input içerisinde nasıl yazdırabiliriz peki msyql e kaydettrecegm de veriyi