나는 목록을 반복하고 콩을 사용하여 값을 표시하고있다 : 난 내 행 세부 사항을 캡처하는 onfocus 및 이벤트를 사용하고 같은수없는 <논리 : 반복 처리>
코드 뭔가를 사용하고 쓰기 이 :
<logic:iterate id="empList" name="search" property="empList" indexId="index">
<tr>
<td>
<span id="empid"><bean:write name="empList" property="empID"/></span>
</td>
<td>
<bean:write name="empList" property="firstName"/>
</td>
<td>
<bean:write name="empList" property="lastName"/>
</td>
<td>
<html:button property="View" value="View" onfocus="viewPage()"/>
</td>
</tr>
</logic:iterate>
<script>
function viewPage(){
var empid = document.getElementByID("empid).innerHTML;
}
</script>
하지만 난 그것이 D 오 getElementId()
입니다 변수 당신이 잘못된 함수 이름을 사용하는 것
파싱 된/브라우저 렌더링 된 HTML을 공유하십시오. [문서에서 동일한 'id'값을 갖는 여러 요소가 없어야합니다 .___] (https : // www .w3.org/TR/html-markup/global-attributes.html # common.attrs.id) – Rayon