나는 텍스트 상자의 배열을 만들고있다. 각 상자에는 해당하는 del 및 edit 옵션이 있습니다.그 값을 알고있는 사이에 자바 스크립트에서 배열의 인덱스를 얻는 방법
for(i=0;i<5;i++)
{
<input type='text' id='pp_insti' name='pp_insti[]' value='"+institute+"' style='display:none;'>
<input type='button' class='edit-button' id='pp_edit name='pp_edit[]' onclick='pp_edit();'/>
<input type='button' class='del-button' id='pp_del name='pp_del[]' onclick='pp_del();'/>
}
편집 할 pp_inst []를 알기 위해 어떤 색인 값을 pp_edit에 전달해야합니까?
사람이 .. 도움이 될 수 있습니다 감사
코드가 자바 스크립트에서 유효하지 않은 것 같습니다. – DhruvPathak