<script type="text/javascript">
window.onload=function(){
var f = document.getElementById('box');
function calA(i){
var d = function (){
var k = f['k[]'][i];
var p = f['p[]'][i];
var a = f['a[]'][i];
k.value = k.value.replace(/[^\d\.]/g,'');
p.value = p.value.replace(/[^\d\.]/g,'');
a.value = (k.value) * (p.value);