?? testcss.jsp
字號:
<%@page contentType="text/html; charset=gb2312" import="java.util.*,school.*,java.io.*"%>
<html>
<head>
<title>文件上載</title>
</head>
<body>
<form action=testFile.jsp enctype="MULTIPART/FORM-DATA" method=post> 作者:
<input type=text name=author><br />
<%
String d=request.getRequestURI();
out.println("根目錄所對應(yīng)的絕對路徑:" + request.getRequestURI() + "<br/>");
int p=d.lastIndexOf("/");
d=d.substring(p+1,d.length());
out.println(d+"<br>");
String strPathFile = application.getRealPath(d);
out.println("文件的絕對路徑:" + strPathFile + "<br/>");
String strDirPath = new File(strPathFile).getParent();
out.println("目錄的絕對路徑:" + strDirPath + "<br/>");
%>
<br>
公司:
<input type=text name=company/>
<br>
<br>
選擇要上載的文件
<input type=file name=filename/>
<br>
文件描述:
<input type=text name=description/>
<br>
<input type=submit value="Upload"/>
說明:
<textarea name=comment cols="100" rows="5"/>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -