<script> function cal(res){ document.getElementById('total').value=parseFloat(res.value)*3; } </script> res:<input type="text" id="resvalue" onblur="cal(this)" /><br/> total:<input type="text" id="total"/>
<script> function cal(res){ if(res.value==""){ alert("กรุณาใส่ค่าด้วยค่ะ"); document.getElementById('total').value=""; res.value=""; res.focus(); // not support firefox //setTimeout(function(){res.focus()}, 10); // warning! maybe bug return; } if(/^(\d+)?(\.\d+)?$/.test(res.value) ){ document.getElementById('total').value=parseFloat(res.value)*3; }else{ alert("รูปแบบผิดค่ะ"); document.getElementById('total').value=""; res.value=""; res.focus(); // not support firefox //setTimeout(function(){res.focus()}, 10); // warning! maybe bug } } </script> res:<input type="text" id="resvalue" onblur="cal(this)" /><br/> total:<input type="text" id="total" />
<script> function cal(res){ var resvalue =res.value.replace(/\,/,""); if(resvalue==""){ alert("กรุณาใส่ค่าด้วยค่ะ"); document.getElementById('total').value=""; res.value=""; res.focus(); // not support firefox return; } if(/^(\d+)?(\.\d+)?$/.test(resvalue) ){ document.getElementById('total').value=parseFloat(resvalue)*3; }else{ alert("รูปแบบผิดค่ะ"); document.getElementById('total').value=""; res.value=""; res.focus(); // not support firefox } } </script> res:<input type="text" id="resvalue" onblur="cal(this)" /><br/> total:<input type="text" id="total" />
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง