 |
ค่าจากฐานข้อมูล text 1 รับ $room_b แสดง 1,000.00 text 2 รับ $value_room แสดง 2,000.00 มันเอามาบวกใส่ใน text 3 |
|
 |
|
|
 |
 |
|
<script>
function c(){
var op1 = document.forms[0].operand1.value.replace(/,/g,'')*1;
var op2 = document.forms[0].operand2.value.replace(/,/g,'')*1;
document.getElementById('answer').innerHTML = op1+op2;
}
</script>
<form>
<input type="text" name="operand1" value="3,000" />
<input type="text" name="operand2" value="2,000" />
<input type="button" onmouseover="c();" value="mouse over here" />
<div id="answer"></div>
</form>
|
 |
 |
 |
 |
Date :
2009-10-26 09:27:32 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เข้ามาขอบคุณพี่ num ก่อน
|
 |
 |
 |
 |
Date :
2009-10-26 10:28:44 |
By :
JavaScrap |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มีขอบคุณข้ามกระทู้ด้วย 555
เดี๋ยวก็มีคนช่วยไม่ต้องรอพี่หรอก อิๆ
|
 |
 |
 |
 |
Date :
2009-10-26 10:36:37 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
 ขอบคุณค่ะ
|
 |
 |
 |
 |
Date :
2009-10-26 10:41:45 |
By :
aa |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|