<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<script src="<%=request.getContextPath()%>/js/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
<img id="loginImg1" src="images/login1.png" class="up">
</body>
</html>
<script type="text/javascript">
$(function(){
$("#loginImg1").click(function(){
var images = ['images/login1.png', 'images/login2.png']
if(jQuery("#loginImg1").attr("src")==images[0]){
$("#loginImg1").attr("src","images/login2.png");
$(img).removeClass();
}else{
$("#loginImg1").attr("src","images/login1.png");
}
});
})
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<script src="<%=request.getContextPath()%>/js/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
<img id="loginImg1" src="images/login1.png" class="up">
</body>
</html>
<script type="text/javascript">
$(function(){
$("#loginImg1").click(function(){
var images = ['images/login1.png', 'images/login2.png']
if(jQuery("#loginImg1").attr("src")==images[0]){
$("#loginImg1").attr("src","images/login2.png");
$(img).removeClass();
}else{
$("#loginImg1").attr("src","images/login1.png");
}
});
})
</script>