?? message.java
字號(hào):
package pchat;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class Message extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";
//Initialize global variables
public void init() throws ServletException {
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
PrintWriter out = response.getWriter();
Random rd=new Random();
out.println("<html>");
out.println("<head><meta http-equiv=refresh content=30;><title>Message</title></head>");
out.println("<body bgcolor=\"#ffffff\">");
if(rd.nextInt()*10>5){
out.println("<marquee><h1 style=\"color:blue\">歡迎來(lái)到無(wú)限休閑空間!最新消息!!美國(guó)總統(tǒng)布什在飛往德國(guó)的路上遭到了一群恐怖分子的綁架!最后布什牛...!收買了那群恐怖分子....具體情況請(qǐng)登陸<a href=www.lai88.com>www.lai88.com</a><h1></marquee>");
}
else
out.println("<marquee derection=left><h1 style=\"color:blue\">歡迎來(lái)到無(wú)限休閑空間!在二月十七號(hào)!!您將會(huì)得到一份精美的禮物!!<a href=www.lai88.com>www.lai88.com</a><h1></marquee>");
out.println("</body>");
out.println("</html>");
out.close();
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
doGet(request, response);
}
//Clean up resources
public void destroy() {
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -