java1996 2016-11-06 07:08 采纳率: 0%
浏览 1099

在网页编写上传文件功能 获取对象的代码怎么写

 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<from action="smartupload.jsp" method="post" enctype="multipart/form-data">
    请选择文件:<input type="file"name="pic">
    <input type="submit"value="上传">
</body>
</html>



<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="org.lxh.smart.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<% SmartUpload smart = new SmartUpload() ;
   smart.initialize(pageContext) ;    // 初始化上传操作
   smart.upload() ;                   // 上传准备
   smart.save("upload") ;             //文件保存
%>
</body>
</html>
  • 写回答

1条回答 默认 最新

  • devmiao 2016-11-06 16:56
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制