Click on Table set values on textbox.
function showRow(row)
{
var x=row.cells;
document.getElementById("pc").value = x[0].innerHTML;
document.getElementById("pn").value = x[1].innerHTML;
document.getElementById("aq").value = x[2].innerHTML;
document.getElementById("mrp").value = x[3].innerHTML;
}
<div class="left">
<table id="invent">
<th class="font">Product_code</th><th class="font">Product_Name</th><th class="font">Quantity</th><th class="font">M_R_P</th>
<%
ArrayList list=i.list();
Iterator itr=list.iterator();
%>
<%
int iii=0;
while(itr.hasNext())
{
Invent ii=(Invent)itr.next();
if(iii%2==0){
%>
<tr class="trr" onclick="showRow(this)">
<td><%=ii.getProduct_Code()%></td>
<td><%=ii.getProduct_Name()%></td>
<td><%=ii.getQuantity()%></td>
<td><%=ii.getM_R_P()%></td>
<%
}
else{
%>
<tr class="trr1" onclick="showRow(this)">
<td><%=ii.getProduct_Code()%></td>
<td><%=ii.getProduct_Name()%></td>
<td><%=ii.getQuantity()%></td>
<td><%=ii.getM_R_P()%></td>
<%}iii++; }%>
</tr>
</table>
</div>