jsp页面的点击触发问题
在jsp页面中有2块用table圈起来的空白区域A和B,我想用鼠标点击空白区域A的时候让空白区域A的背景颜色变成蓝色,再点击一下则又变回原先的背景颜色,空白区域B的操作效果也是如此,该怎么办呢?
注:A,B是空白区域,在页面上看不到按钮一类的东西的
<table id=table border='1'>
<tr height='30'>
<td style='width:200' id='table1' onclick='change_bgcolor(table2)'> </td>
<td style='width:200' id='table2' onclick='change_bgcolor(table1)'> </td>
</tr>
</table>
<script>
function 'change_bgcolor(id){
var obj = document.getElementById(id);
if(obj.style.backgroundcolor=='red'){
obj.style.backgroundcolor=='green' ;
}else{
obj.style.backgroundcolor=='red';
}
}
</script>
没有测试,大致是这样的
中Table中加个" "试试看
<head>
</head>
<body>
<table id=table border='1'>
<tr height='30'>
<td style='width:200;back
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
//用客户的session的id建立一个临时文件:
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......
我想登录后,如果登录成功就去执行某个页面
我现在的代码是这样的:
if(rs.next()){
session.setAttribute( "username" , user);
<jsp:include page="login.jsp" />// ......
一个JSP页面接收其他页面提交过来的FORM表单,但是要求只接收当前站点及其子站点提交过来的FORM表单,其他站点提交过来的表单不接收,这个怎么设置?
用过滤器
filter
将当前站点及其子站点放一个目录
然 ......