jsp:sy04

1.

--%>
<%@ page contentType="text/html;charset=gb2312" language="java" %>


    Title


个人消息调查表(*为必填项目)

姓名:

*

年龄:

*

学历:

Email:

*

爱好:
旅游 游泳 服装
阅读 音乐 购物

对本站的评价:

一般

其他消息:


选择背景:
<%@ page contentType="text/html;charset=gb2312" language="java" %>
<%
    request.setCharacterEncoding("gb2312");
%>


    Title


<%
    String a="";
    String ar=request.getParameter("ptu");
    if(ar.equals("flower")){
        a="img/1.jpeg";
    }else a="img/2.png";

%>
姓名:<% String name=request.getParameter("username"); out.println(name); %>
年龄:<%=request.getParameter("age")%>
学历:<%=request.getParameter("xueli")%>
Email:<%=request.getParameter("email")%>
爱好:<% String st[]= request.getParameterValues("hobby"); for (int i = 0; i < st.length; i++) { out.println(st[i]+" "); } %>
对本站的评价:<%=request.getParameter("sorce")%>
其他消息:<% String s=request.getParameter("textarea"); out.println(s); %>

2.

<%@ page contentType="text/html;charset=gb2312" language="java" %>


    友情跳转页面


友情链接

<%@ page contentType="text/html;charset=UTF-8" language="java" %>


    Title


<%
  String a;
  a=request.getParameter("school");
  response.sendRedirect(a);
%>


3.

<%@ page contentType="text/html;charset=UTF-8" language="java" %>


    Title


<%
  response.setIntHeader("Refresh", 1);
  Calendar calendar = new GregorianCalendar();
  String am_pm;
  int hour = calendar.get(Calendar.HOUR);
  int minute = calendar.get(Calendar.MINUTE);
  int second = calendar.get(Calendar.SECOND);
  if(calendar.get(Calendar.AM_PM) == 0)
    am_pm = "AM";
  else
    am_pm = "PM";
  String CT = hour+":"+ minute +":"+ second +" "+ am_pm;
  out.println("当前时间为: " + CT + "\n");
%>



 

 

你可能感兴趣的:(jsp,java,开发语言)