<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ page import="java.util.*"%>
<%@ page import="com.bjsxt.shopping.*,java.sql.*"%>
<%@ include file="_sessioncheck.jsp"%><%
List<Category> categories =Category.getCategories();
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
<script language="javascript" src="script/TV20.js"></script>
<script type="text/javascript">
function t(key, parentkey){
document.forms["form"].pid.value = parentkey;
}
function modify(key, parantkey){
window.parent.frames["detail"].location.href="categorymodify.jsp?id=" + key;
}</script>
</head>
<body>
<table align="center" border="1">
<tr><td id="show"></td></tr>
<tr><td>
<form action="categoryadd.jsp" name="form" method="post" >
<input type="hidden" name="action" value="add">
<input type="text" name="pid" value="" readonly><br>
<input type="text" name="name">
<br>
<textarea rows="12" cols="80" name="descr"></textarea>
<br>
<input type="submit" value="提交">
</form>
</td></tr>
</table>
<script language="javascript">
addNode(-1,0,"所有类别","images/top.gif");
<!--
<% for(Iterator<Category> it=categories.iterator();it.hasNext();){
Category c=it.next();
%>
addNode(<%=c.getPid()%>,<%=c.getId()%>,"<%=c.getName()%>","images/top.gif");
<%}
%>
showTV();
addListener("click","t");
addListener("dblclick","modify");
-->
</script>
</body>
</html>
这是个树状的展图 可是双击里面任何一个都没反应
我感觉这句话有问题就是运行的时候正常的话双击应该到这个categorymodify.jsp文件可是双击什么反应也没有里面输入alter('ok')还可以用
但是输入这个就是不行。。
我想问一下是这里出问题了吗?还有 ["detail"]这是什么意思,里面的detail是函数还是随便输入的那?
function modify(key, parantkey){
window.parent.frames["detail"].location.href="categorymodify.jsp?id=" + key;
}
大家帮忙看一下 ,先谢谢了!
pageEncoding="GB18030"%>
<%@ page import="java.util.*"%>
<%@ page import="com.bjsxt.shopping.*,java.sql.*"%>
<%@ include file="_sessioncheck.jsp"%><%
List<Category> categories =Category.getCategories();
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
<script language="javascript" src="script/TV20.js"></script>
<script type="text/javascript">
function t(key, parentkey){
document.forms["form"].pid.value = parentkey;
}
function modify(key, parantkey){
window.parent.frames["detail"].location.href="categorymodify.jsp?id=" + key;
}</script>
</head>
<body>
<table align="center" border="1">
<tr><td id="show"></td></tr>
<tr><td>
<form action="categoryadd.jsp" name="form" method="post" >
<input type="hidden" name="action" value="add">
<input type="text" name="pid" value="" readonly><br>
<input type="text" name="name">
<br>
<textarea rows="12" cols="80" name="descr"></textarea>
<br>
<input type="submit" value="提交">
</form>
</td></tr>
</table>
<script language="javascript">
addNode(-1,0,"所有类别","images/top.gif");
<!--
<% for(Iterator<Category> it=categories.iterator();it.hasNext();){
Category c=it.next();
%>
addNode(<%=c.getPid()%>,<%=c.getId()%>,"<%=c.getName()%>","images/top.gif");
<%}
%>
showTV();
addListener("click","t");
addListener("dblclick","modify");
-->
</script>
</body>
</html>
这是个树状的展图 可是双击里面任何一个都没反应
我感觉这句话有问题就是运行的时候正常的话双击应该到这个categorymodify.jsp文件可是双击什么反应也没有里面输入alter('ok')还可以用
但是输入这个就是不行。。
我想问一下是这里出问题了吗?还有 ["detail"]这是什么意思,里面的detail是函数还是随便输入的那?
function modify(key, parantkey){
window.parent.frames["detail"].location.href="categorymodify.jsp?id=" + key;
}
大家帮忙看一下 ,先谢谢了!
function modify(key, parantkey){
window.parent.frames["detail"].location.href="categorymodify.jsp?id=" + key;
} 这段话的意思是 定位一个叫detail的框架(frame) 并且设置href=" URL "你是有个框架frame 名字叫detail
Html中 <frameset></frameset> 是设置框架的这个不是随便输入的哦意思是名叫main的frame中的document的title