📄 index.jsp
字号:
<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><%response.setHeader("Cache-Control","no-store");response.setDateHeader("Expires",0);%><%!public String[] getQuestion(String s){String[] strQ = new String[4];String strTemp = null;int i;java.io.RandomAccessFile rf = null;try {rf = new java.io.RandomAccessFile(s,"r");} catch(Exception e){System.out.println(e);System.exit(0);}for(i=0;i<4;i++) {try {strTemp = rf.readLine();} catch(Exception e){}if(strTemp==null)strTemp = "";strQ[i] = strTemp;}return strQ;}%><%String s = null;String[] question = new String[4];s = request.getRealPath("question.txt");question = getQuestion(s);%><html> <head> <title></title> </head> <body> 你喜欢清风阁论坛吗? <br> <form name=frm method=post action=write.jsp> <tr> <td><%String ss = null;for (int i=0;i<4;i++){ss = "<input type=\"radio\" name=\"choice\" value=" + i+">"+(char)('A'+i)+"、"+ question[i]+"<br>";out.println(ss);}%> </td> </tr> <tr> <td align=center><input type=submit value="投 票"></td> </tr> <tr> <td align=center> <img src="/servlet/VoteImage" width=150 height=100> <br> <img src="yang.jpg" width=150 height=100> </td> </tr> </form> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -