jsp实现的是删除文件列表中的文件功能,txt_id记录文件ID的,
‘删除’按钮调用javascript的del函数设置txt_id的值,
点击按钮时,删除了相应文件,但是点击IE刷新按钮时,因为
txt_id还有值,所以出错,如何在点击IE刷新时,但不判ie按钮刷新,重新设置txt_id的值
。
<form name="form1" action="/manageaart.html" method="post">
<input type="hidden" name="txt_id" value=""><input type="button" value="删除" onclick="return del();" style="cursor:hand;">
....
</form>
‘删除’按钮调用javascript的del函数设置txt_id的值,
点击按钮时,删除了相应文件,但是点击IE刷新按钮时,因为
txt_id还有值,所以出错,如何在点击IE刷新时,但不判ie按钮刷新,重新设置txt_id的值
。
<form name="form1" action="/manageaart.html" method="post">
<input type="hidden" name="txt_id" value=""><input type="button" value="删除" onclick="return del();" style="cursor:hand;">
....
</form>
此时执行<form>的Action后,txt_id值不为空。如果不设置为空,点击IE
刷新按钮时txt_id值还是不为空。