<% i=0 %>
<% if @group_page %>
<% for group in @group_page % >
< ;% i =1 %>
> ;td class="first style1"><%= group.id.to_s %>
<%= group.group_name==nil '': 그룹. group_name.to_s %>
| <%= group.display_order==nil ? '': group.display_order.to_s %> | td><%= group.update_dt.strftime("%Y-%m-%d") %>
<%= group.status.to_s == ' 0' ? '일반': "비활성화" %> |
<%= group.group_comment==nil ? '': group.group_comment.to_s %> td> < ;td><%= link_to image_tag('/images/cs/edit-icon.gif'),{},{:onclick =>"show_div('" group.id.to_s " ','" 그룹.group_name.to_s "','" group.display_order.to_s "','" group.status.to_s "','" group.group_comment.to_s "');return false;" } %> ; |
<%= link_to image_tag('/images/cs/hr.gif'),{:action=>'deletegroup',:id=>group.id .to_s},{: verify=>'삭제하시겠습니까?'} %> |
<% end %> <% end %>
2, js 함수 부분
<script> <div class="codebody" id="code31186">function show_div(object1,object2,object3,object4,object5) <br>{ <br>document.getElementById("original_group").style. display = "none"; <br>document.getElementById("modify_group").style.display=""; <br>document.getElementById("group_id").value =object1 <br>document.getElementById("modify_name ").value =object2; <br>document.getElementById("modify_order").value =object3; <br>if ( object4 == "0"){ <br>document.getElementById('modify_status').selectedIndex= 0; <br>} <br>if( object4 == "1"){ <br>document.getElementById('modify_status').selectedIndex=1 <br>} <br>document.getElementById("modify_comment") .value =object5; <br>} <br> </script>
이렇게 하면 js를 사용하여 값을 전달하는 클라이언트를 구현할 수 있습니다........... ...