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>
相关文档:
<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......
树节点组合模型
package cn.com.jsnh.model.catalog;
public class TreeModel {
private String node;
private CatalogModel model;
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public CatalogModel getModel() {
return model;
}
public void setMo ......
JSP中有两种包含语句:
1. <%@include file="head.jsp" %>
2. <jsp:include page="head.jsp" />
或者:
<jsp:include page="jieshou.jsp">
<jsp:param name="canshu" value="magci" />
&nbs ......
JSP共有以下9种基本内置组件(可与ASP的6种内部组件相对应):
1.request 用户端请求,此请求会包含来自GET/POST请求的参数。
2. response 网页传回用户端的回应 。
3.pageContext 网页的属性是在这里管理 。
4.session 与请求有关的会话期。
5.ap ......
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 ......