电脑怎样限制装软件 怎么限制软件运行
2008-10-30 02:58
344 查看
为了防止用户刷屏重复提交,有的时候会让人很头痛。
解决方法有:struts的令牌。。。还其他的么,不知道了。
而我现在忽然想起了一个方法就是通过JS也解决问题。。经过多方测试,自我感觉良好。
解决方案:
如果在某一个action中,需要作这个防刷功能,那么我会在用户提交时,
1、给页面加上<frame>标签
2、给FORM加上TARGET指向<frame>;
3、提交。
4、提交后用JS调父窗体刷新
解决方法有:struts的令牌。。。还其他的么,不知道了。
而我现在忽然想起了一个方法就是通过JS也解决问题。。经过多方测试,自我感觉良好。
解决方案:
如果在某一个action中,需要作这个防刷功能,那么我会在用户提交时,
1、给页面加上<frame>标签
<iFrame id="slipFrame" name="slipFrame" src="about:blank" width="100%" height=0 marginwidth=″0″ marginheight=″0″ frameborder="0" scrolling="no" space="0" vspace="0"></iframe>
2、给FORM加上TARGET指向<frame>;
document.addCompositRule.action = "systemEditCompositRuleCondition.do?actions=update"; document.addCompositRule.target = "slipFrame"; document.addCompositRule.submit(); event.srcElement.disabled = true;
3、提交。
4、提交后用JS调父窗体刷新
//成功或失败:回调方法 function sucessCallback(){ refreshRule(); }
function doPost() { //System.out.println("errorMsg:"+"="+<c:out value="${errorMsg}"/>); alert("操作成功!"); if( opener != null ) { opener.sucessCallback(); window.close(); } else if( parent != null ) { parent.sucessCallback(); } }
相关文章推荐
- 怎么提高电脑运行速度?怎样提高?如何提高?
- 运行软件时遇到windows已保护你的电脑怎么办?
- 怎么通过应用程序控制策略限制软件运行?(转载)
- 限制软件在一台电脑上运行
- 如何限制非管理用户访问文件夹或者运行软件
- 电脑硬盘数据丢了怎么恢复丨无敌数据恢复软件丨
- 怎样手工制作在没有安装jre的电脑上可运行的java程序
- 电脑开机后,就会自动运行chkdsk,我想取消chkdsk,怎么取消
- Day2 如何在没有安装halcon软件的电脑上运行halcon编写的程序
- 电脑运行慢怎么办?电脑提速方法教学
- C# 限制软件单进程运行
- 运行软件弹出错误 access violation at address 004096da write of address 00401000 怎么解决
- Win10下怎么查看电脑配置以此来判断是否支持运行一些游戏
- java 程序用exe4j 打包成exe,怎样在没有jdk环境电脑上运行
- QT 怎么运行release下面的文件,QT软件怎么发布
- 怎么让MAC系统CrossOver支持中文软件运行
- 用“运行”窗口快速打开电脑中的软件
- 发布软件之前,怎样告诉用户怎么用
- MFC程序中将软件打包后,setup.exe文件自己电脑运行正常,别人电脑显示找不到文件路径
- C++Builder 2010 生产的EXE软件在没由安装C++Builder 2010的电脑上运行的方法