jsp中动态提交action与弹出确认对话框
jsp页面中根据一个checked是否被选中来弹出不同的确认对话框。
<script type="text/javascript">
function modifyDetail() {
var v = document.getElementById("isDelete");
if(v.checked) {
return confirm("Are you sure delete?");
}else {
return confirm("Are you sure update?");
}
}
</script>
jsp页面中根据一个checked是否被选中来弹出不同的确认对话框,并提交不同的action。
<script type="text/javascript">
function modifyDetail() {
var v = document.getElementById("isDelete");
if(v.checked) {
var action = document.getElementById("f1");
f1.action = "delectBlacklist";
f1.submit;
return confirm("Are you sure delete?");
}else {
return confirm("Are you sure update?");
}
}
</script>
相关文档:
一、安装JDK 首先下载JDK 5.0(JDK 5.0的下载页面为:http://java.sun.com/j2se/1.5.0/download.jsp); 然后运行JDK 5.0安装程序jdk-1_5_0_06-windows-i586-p.exe,安装过程中所有选项保持默认;最后配置JDK的环境变量:在“我的电脑”上点右键—>“属性”—>“高级”& ......
这是一个用户注册的页面,部分代码(没有错误)已略,可是不能实现form的action跳转
checkform()里明明有document.form.submit(),就是不能跳转,
能帮我看下问题出在哪吗?
这是照着书上的例子写的,注册和重置动都作是通过图片来处理的。
请不吝赐教,在下不胜感激。。。
<%@ page contentType="te ......
1 Javascript ,设置一个变量,只允许提交一次。
#lt;script language="javascript"#gt;
var checkSubmitFlg = false;
function checkSubmit() {
if (checkSubmitFlg == true) {
return false;
}
checkSubmitFlg = true;
return true;
}
document.ondblcli ......
struts-config:
<action path="/articleManage" name="articleManageForm" scope="request" type="auction.action.ArticleManageAction" validate="false">
<forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
<forward ......