<% if @state == 1 %>
alert("您还未登录");
<% elsif @state == 2 %>
alert("申请成功,请等待审核");
$("#homework_apply_status_<%=@homework.id %>").html("待审核");
<% elsif @state == 3 %>
alert("您已经发送过申请了,请耐心等待");
<% end %>