jpfss

在提交表单或者执行某个事件之后,如果需要重置表单(即清空表单里的数据)

可以执行下面代码来完成

方式一:

self.location.href="userController.do?goAddOrUpdate";(双引号里面填写当前页面URL)

方式二:(去掉href)

self.location="userController.do?goAddOrUpdate";

方式三:(把上面的self改成this)

this.location="userController.do?goAddOrUpdate";

this.location.href="userController.do?goAddOrUpdate";

方式四:(放大招,通过reload方法)

this.location.reload();

self.location.reload();

分类:

技术点:

相关文章:

  • 2021-06-03
  • 2021-12-05
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-12-29
  • 2021-12-05
  • 2021-11-29
猜你喜欢
  • 2021-12-05
  • 2021-08-13
  • 2021-11-27
  • 2022-12-23
  • 2021-12-19
  • 2021-04-17
相关资源
相似解决方案