jquery提交表单(1主页面)

本文介绍了一个使用JSP(Java Server Pages)技术实现的产品展示与编辑页面,包括页面布局、数据绑定、动态内容加载以及产品详情页的交互功能。通过使用JSTL(JavaServer Pages Standard Tag Library)简化了页面开发过程,提供了产品列表的遍历显示及单击事件触发的详细信息查看与编辑功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

啥也不说了,直接上例子!!!!

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri = "/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'product.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function opennew(id, name, price) {
window.open("update.jsp?id=" + id + "&name=" + encodeURIComponent(name) + "&price=" + price,
"newwindow", "height=300,width=400,top=100,left=500,resizable=no"
);
}
</script>


  </head>
  
  <body> 
   <table border=1>
    <tr>
    <td>代码</td>
    <td>名称</td>
    <td>价格</td>
    </tr>
    <s:iterator value = "list">
    <tr>
    <td><s:property value = "product_id"/></td>
    <td><s:property value = "product_name"/></td>
    <td><s:property value = "product_price"/></td>
    <td><a href="javascript:opennew('<s:property value = "product_id"/>',
    '<s:property value = "product_name"/>',
    '<s:property value = "product_price"/>')">修改</a></td>
    </tr>
    </s:iterator>
   </table>
  </body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值