以下两个隐藏表单              <td><a style="cursor:pointer;" onclick="con_action(this.className)" class="form_106">批准申请</a></td>
              <form id="form_106" action="/admin_admin.php/Member/applys" method="post">
              <input type="hidden" name="id" value="106" />
              <input type="hidden" name="apply" value="0" />
              <input type="hidden" name="think_html_token" value=""/></form>              <td><a style="cursor:pointer;" onclick="con_action(this.className)" class="form_118">批准申请</a></td>
              <form id="form_118" action="/admin_admin.php/Member/applys" method="post">
              <input type="hidden" name="id" value="118" />
              <input type="hidden" name="apply" value="0" />
              <input type="hidden" name="think_html_token" value=""/></form>
通过点击 批准申请 提交, 提交JS如下
function con_action(id){
if(confirm('确认修改?')){
alert(id);alert(document.getElementById(id).method);alert(document.getElementById(id).action);
document.getElementById(id).submit();
}
}点击第二个,正常提交了,点击第一个,总是报 对象不支持此属性或方法 的错。高人看看, 可能是什么问题。