1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 <meta charset="UTF-8">
 5 <title>嗨,傻逼</title>
 6 </head>
 7 <body>
 8 hello<br>
 9 <font color="red" face="微软雅黑" size="17">四处相望心疼多于心动,真的想读懂么,对你我无法遗忘。</font><br>
10 <br>
11 <font color="green" size="17">其实我并不孤单,无时无刻我不思念着你,你就在我身边一样,那么亲,那么近。我能感觉到你的开心,感觉到你的笑,有你,我的每一天都那么充实,有你,我的每一秒都那么精彩。有你,我就是最幸福的男人。</font>
12 <br>
13 
14 <a href="./img/io.jpg" ><img src="./img/io.jpg" border="3" height="500" width="500"></a>
15 <img src="./img/io.jpg" border="3" height="500" width="500">
16 <img src="test/java Resources/src/Exceptions.png" />
17 <form>
18     <table border="2">
19         <tr>
20             <td>face</td>
21             <td>size</td>
22             <td>height</td>
23         </tr>
24         <tr>
25             <td>invail</td>
26             <td>border</td>
27             <td>width</td>
28         </tr>
29     </table>
30 </form>
31 &nbsp;nbsp
32 &nbsp;
33 <br>
34 <br>
35 <form action="" method="post">
36     name:<input type="text" name="name1"><br>
37     password:<input type="password" name="password1"><br>
38     form:<input type="radio" name="gender" value="male">male
39     <!-- 以下注意name -->
40     <input type="radio" name="gender" value="female">female<br>
41     <input type="checkbox" name="moive" value="see moive">see moive
42     <input type="checkbox" name="play" value="play computer game"> play computer game<br>
43     <input type="file" name="photo"><br>
44     
45     
46     <input type="submit" value="submit">
47     <input type="reset" value="reset">
48     <br>
49     <textarea cols="55" rows="5"> please attention comments </textarea>
50 </form>
51 </body>
52 </html>

 以下是jsp,无聊之举

 1 <%@ page language="java" contentType="text/html; charset=utf-8"
 2     pageEncoding="utf-8"%>
 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 4 <html>
 5 <head>
 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 7 <title>hello</title>
 8 </head>
 9 <body>
10     hi
11     <%!
12         int a=0,b=0;double num1=0,num2=0,num3=0;
13     private Double add(double x,double y){
14         return x+y;
15     }
16     private double except(double x,double y){
17         return x/y;
18     }
19     private float exceptf(float x,float y){
20         return x/y;
21     }
22     private int  excepti(int a,int b){
23         return a/b;
24     }
25     %>
26     <% 
27         num1=add(1,3);
28         num2=except(1.0,-0.0);
29         num3=except(1.0,0.0);
30     %>
31     <h1>num1=<%=num1 %></h1>
32     <h2>num2=<%=num2 %></h2>
33     <h3>num3=<%=num3 %></h3>
34     
35     <%-- <h4>num4=<%try {excepti(1,0);}catch(){} %></h4>       --%>
36     <% out.println(num1); %>
37     <%-- jsp 注,客户端不可见 --%>
38     <!-- html static -->
39     <%-- 以下是page指令
40         <%@ page language="" contextTpye="text/html ;charset=utf-8 "
41                  import="java.util.*","java.io"
42                  session="true/false"
43                  isErrorPage:true/false,处理页面
44                  errorPage:"url"
45                  pageEnCoding
46         %> 
47      --%>
48      <%-- 以下是include指令
49         <%@ inclde file="url"使用相对路径
50         %> 
51      --%>
52      <%--
53              jsp 隐式对象
54              out  request response 
55       --%>
56     <h1> 输出月亮:<%=new java.util.Date().toString() %></h1>
57 </body>
58 </html>

View Code

 

版权声明:本文为pppjjjccc原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/pppjjjccc/p/6684970.html