|
|
#3 (permalink) |
|
Re: PHP ile ondalıklı sayıyı nasıl kırparız.
__________________
onurkose.com |
|
|
|
|
|
|
#6 (permalink) |
|
Üyelik Tarihi: 02.05.2002
Yer: adana
Yaş: 29
Mesaj: 11
|
Re: PHP ile ondalıklı sayıyı nasıl kırparız.
ilginizden dolayı teşekkür ederim. sorunu çözdüm
<? $toplamlar=3545435453 $toplamlar=number_format($toplamlar, 2, ',', '.'); echo $toplamlar; ?> JAVA scriptle sayıları formdan alıyorum Math.floor(toplam.value * 100)/100; fonksiyonu var dikkat ederseniz sayıyı kırpıyor <script language="JavaScript"><!-- function islem(){ with (document.all) toplam.value = 5 * en.value * boy.value / 10000 * adet.value; with (document.all) toplam.value=Math.floor(toplam.value * 100)/100; } function topis(){ with (document.all) toplamis.value = en.value * boy.value * adet.value / 10000 ; with (document.all) toplamis.value=Math.floor(toplamis.value * 100)/100; } function topadet(){ with (document.all) toplam.value = 5 * adet.value; with (document.all) toplam.value=Math.floor(toplam.value * 100)/100; with (document.all) toplamis.value = adet.value; } --> </script> <HTML> <th scope="col"><label> en:<input name="en" type="text" id="en" size="3" maxlength="10" onKeyUp="islem()"/> </label></th> <th scope="col"><label> <span class="style15"> boy:<input name="boy" type="text" id="boy" size="3" maxlength="10" onKeyUp="islem()"/> </span></label></th> <th scope="col"><label> adet: <input name="adet" type="text" id="adet" size="3" maxlength="10" onKeyUp="islem()" /> </label></th> <th scope="col">toplam yapılan iş <input name="toplamis" type="text" id="toplamis" size="3" maxlength="50" onFocus="topis()" /> </th> <th width="30" scope="col"><div align="left"> toplam fiyat<input name="toplam" type="text" id="toplam" size="5" /> </div></th></HTML>
__________________
Teşekkürler: Cem Yaşam AKA |
|
|
|
| Sponsorlu Bağlantılar | |
|
Zoque.Forum
Reklam
|
|
Zoque'a hoşgeldiniz!