03.
<head>
04.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
05.
<title></title>
06.
<script src=
"js/jquery.min"
></script>
07.
<script type=
"text/javascript"
>
08.
$(document).ready(
function
(){
09.
10.
$(
"#txt1,#txt2"
).keyup(
function
(){
11.
$(
"#result"
).val(parseFloat($(
"#txt1"
).val())+parseFloat($(
"#txt2"
).val()));
12.
});
13.
});
14.
</script>
15.
</head>
16.
<body>
17.
<?
18.
$i
=0;
19.
while
(
$i
<2)
20.
{
21.
?>
22.
<input name=
"txt[]"
id=
"txt[]"
type=
"text"
value=
"<?=$data[price];?>"
/>
23.
<?
24.
$i
++;
25.
26.
}
27.
?>
28.
=
29.
<input name=
"result"
id=
"result"
type=
"text"
/>
30.
31.
</body>
32.
</html>