📄 lettersong.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%
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>lettersong.jsp</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=path%>/common/xhr.js"></script>
<script type="text/javascript">
function addselect(songId){
createXMLHttpRequest();
//alert(songId);
xmlHttp.onreadystatechange = addsession;
xmlHttp.open("GET", "<%=path%>/songs.do?methods=addSelectSong&id="+songId , true);
xmlHttp.send(null);
}
function addsession(){
if(xmlHttp.readyState == 4){
//alert(xmlHttp.status);
if(xmlHttp.status == 200){
//var xmlDoc = xmlHttp.responseXML;
}
}
}
</script>
</head>
<body>
<table cellspacing="1" cellpadding="3" border="1">
<tr>
<td>编号</td>
<td align="center">歌曲名</td>
<td align="center">选择</td>
</tr>
<%int i=0; %>
<logic:iterate id="song" name="lettersongList" type="com.ktv.entity.Song" scope="request">
<tr>
<td align="center"><%=++i%></td>
<td align="left" char="10" id="songName"><bean:write name="song" property="songName" /></td>
<td align="center" id="choose">
<span onclick="addselect('<bean:write name='song' property='songId' />');">选择</span>
<input type="button" value="选择" onclick="addselect('<bean:write name='song' property='songId' />');"/></td>
</tr>
</logic:iterate>
</table>
<%String songNameLetter=request.getAttribute("songNameLetter").toString();
String p="songs.do?methods=getLetterList&songNameLetter="+songNameLetter;
%>
<jsp:include page="/common/page.jsp">
<jsp:param name="formName" value="songForm"/>
<jsp:param name="actionName" value="<%=p %>"/>
</jsp:include>
</body>
</html>
<!--
<td align="center" id="songId"><bean:write name="song" property="songId" />
</td>
-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -