js:不支持此属性或方法
点击 "彻底删除按钮 ":出现错误!脚本提示 "不支持此属性或方法 ",位置在按纽地方.
------------------------------------------------------
<%@ page contentType= "text/html;charset=GB2312 " %>
<%request.setCharacterEncoding( "gb2312 ");%> <!--中文处理代码-->
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 显示接收的邮件 </title>
<style>
</style>
<script language= "text/javascript ">
function delPer()
{
document.form1.action= "doMail.jsp?tag=delPer ";
document.form1.submit();
}
</script>
</head>
<body>
<form id= "form " action= "search.jsp " method= "post " name= "search ">
<table width= "780 " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> <%=boxName%> </td>
<td> <label>
<div align= "right ">
<input type= "hidden " name= "boxType " value= " <%=b%> ">
<input name= "keyword " type= "text " maxlength= "50 ">
<input type= "submit " name= "Submit " value= "搜索 ">
</div>
</label> </td>
</tr>
</table>
</form>
<form name= "form1 " method= "post " action= " ">
<table width= "780 " border= "1 " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td> <table width= "780 " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td width= "678 ">
<label>
<input type= "button " value= "彻底删除 " onClick= "delPer() "> //就这里
</label>
<label>
<input name= "del " type= "button " id= "del " value= "删除 ">
<input name= "mark " type= "button " id= "mark " value= "标记 ">
<select name= "select ">
<option value= "new " selected> 新邮件 </option>
<option value= "read "> 已读 </option>
</select>
</label> </td>
<td width= "200 " align= "right "> <label>
<select name= "select2 ">
<option> 收件箱 </option>
<option> 发件箱 </option>
<option> 草稿箱 </option>
<option> 垃圾箱 </option>
</select>
<input name= "move " type= "submit " id= "move " value= "移动 ">
</label>
</td>
</tr>
</table> </td>
</tr>
<tr>
<td> <table width= "780 " border= "1 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td width= "30 " height= "25 " align= "center "> <label>
<input type= "checkbox " name= "ck_all " value= "checkbox ">
</label> </td>
<td width= "150 " height= "25 "> 发件人 </td>
<td height= "25 "> 主题 </td>
<td width= "100 " height= "25 "> 时间 </td>
<td width= "50 " height= "25 "> 附件 </td>
<td width= "50 " height= "25 "> 大小 </td>
</tr>
<tr>
<td width= "30 " height= "20 " align= "center "> <label>
<input type= "checkbox " name= "ck_item " value= " <%=id%> ">
<%-- <input type= "hidden " name= "mailType " value= " <%=type%> ">
--%> </label> </td>
<td width= "150 " height= "20 "> <%if(from!= " "){%> <%=su.toHtml(from)%> <%}else{%> <%}%> </td>
<td height= "20 "> <%if(subject!= " "&&subject!=null){%>
<a href= "readMail.jsp?id= <%=id%> &type= <%=type%> "> <%=subject%> </a>
<%}else{%> (无) <%}%> </td>
<td width= "100 " height= "20 "> <%if(sentDate!= " "){out.print(sentDate);}else{%> <%}%> </td>
<td width= "50 " height= "20 " align= "center "> <%if(attachFlag==1){%> <img src= "resources/ico/attach.gif " alt= "附件 "> <%}else{%> <%}%> </td>
<td width= "50 " height= "20 "> <%if(size!= " "){out.print(size);}else{%> <%}%> </td>
</tr>
<tr>
<td width= "30 " height= "25 "> </td>
<td width= "150 " height= "25 "> </td>
<td height= "25 "> </td>
<td width= "100 " height= "25 "> </td>
<td width= "50 " height= "25 "> </td>
<td width= "50 " height= "25 "> </td>
</tr>
</table> </td>
</tr>
<tr>
<td> <table width= "780 " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td>
<label>
<input name= "delPer " type= "button " id= "delforever " value= "彻底删除 " onClick= "delPer() ">
</label>
<label>
<input name= "del " type= "button " id= "del " value= "删除 ">
<input name= "mark " type= "button " id= "mark " value= "标记 ">
<select name= "select ">
<option value= "new " selected> 新邮件 </option>
<option value= "read "> 已读 </option>
</select>
</label> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
[解决办法]
<script language= "text/javascript ">
function delPer()
{
document.form1.action= "doMail.jsp?tag=delPer ";
document.form1.submit();
}
</script>
完你的文档中没有 form1 这个 FORM 呀!
[解决办法]
早上看到过这个问题了,解决是input的name不要和js的函数名一行,你改了一个,但是还少改了一个,下面还有个 <input name= "delPer " type= "button " id= "delforever " value= "彻底删除 " onClick= "delPer() "> ,去掉这里的name就正常了