日期:2014-05-16 浏览次数:20878 次
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%> <% 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 'newfive.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"> --> <style type="text/css"> .red{ background-color: red; color:yellow; } .green{ background-color: green; color:white; } </style> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> $().ready(function(){ $('#mydiv').addClass("green"); $('#b1').click(function(){ $('#mydiv').fadeTo("slow",1);//淡入 }); $('#b2').click(function(){ $('#mydiv').fadeTo("slow",0);//淡出 }); $('#b3').click(function(){ $('#mydiv').hide("slow");//隐藏 }); $('#b4').click(function(){ $('#mydiv').show("slow");//展示(隐藏后才有用) }); $('#b5').click(function(){ $('#mydiv').slideUp("slow");//向上合拢 }); $('#b6').click(function(){ $('#mydiv').slideDown("slow");//向下展开 }); $('#b7').click(function(){ $('#mydiv').toggle(&qu