JavaScript Uploadify文件上传实例


Posted in Javascript onFebruary 28, 2017

前言

java+javascript,没用上数据库,做了一个简简单单的jsp上传小功能,就是记录一下,对于这个小项目有什么建议,欢迎指出不足之处 (-_+)

PS:从我的包名看得出,我用过很多前辈们的代码,基本上都是东凑西拼,各个部分代码的出处就不一一列出了,能看就行!

运行环境:

Java EE + Tomcat 7.0

项目结构
( Dynamic Web Project )

JavaScript Uploadify文件上传实例

src各部分代码

1. com.bijian.study.Upload.java

package com.bijian.study;

import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;

import com.test.util.FileUtil;

@SuppressWarnings("serial")
public class Upload extends HttpServlet {

  private final String SEP = File.separator;
  private FileUtil fUtil = new FileUtil();

  @SuppressWarnings("unchecked")
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    String savePath = this.getServletConfig().getServletContext()
        .getRealPath("");
    savePath = savePath + "/uploads/";

    File f1 = new File(savePath);
    System.out.println(savePath);
    if (!f1.exists()) {
      f1.mkdirs();
    }
    DiskFileItemFactory fac = new DiskFileItemFactory();
    ServletFileUpload upload = new ServletFileUpload(fac);
    upload.setHeaderEncoding("utf-8");

    String package_path = request.getParameter("save_path");
    String remark = request.getParameter("remark");

    List fileList = null;
    try {
      fileList = upload.parseRequest(request);
    } catch (FileUploadException ex) {
      return;
    }
    Iterator<FileItem> it = fileList.iterator();
    String name = "";
    String extName = "";
    String sysDate = "";
    String fileFrom = "";
    while (it.hasNext()) {
      FileItem item = it.next();
      if (!item.isFormField()) {
        long size = item.getSize();
        String type = item.getContentType();
        name = item.getName();
        if (name == null || name.trim().equals("")) {
          continue;
        }
        if (name.lastIndexOf(".") >= 0) {
          extName = name.substring(name.lastIndexOf("."));
        }
        File file = null;
        do {
          file = new File(savePath + name + extName);
        } while (file.exists());
        File saveFile = new File(savePath + name);
        fileFrom = saveFile.getAbsolutePath();
        Date now = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat(
            "yyyy/MM/dd HH:mm:ss");
        sysDate = dateFormat.format(now);
        try {
          item.write(saveFile);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
    remark = ChangeDeocode(remark);
    package_path = ChangeDeocode(package_path);

    String keep_path = "C:" +SEP+ package_path+SEP+name;
    String save_path = "C:" +SEP+ package_path;
    if(!fUtil.isFileExist(save_path)){
      fUtil.mkDir("C:" +SEP+ package_path);
    }

    fUtil.copyFile(fileFrom, keep_path);
    if(fUtil.isFileExist(keep_path)){
      fUtil.appendMethod(name + "|" + sysDate + "|" + remark+"|"+save_path);
    }
    response.getWriter().print(name + "\\" + sysDate + "\\" + remark);
  }


  public String ChangeDeocode(final String dataStr) {
    String ToDeocode = "";
    if (dataStr.contains("%")) {
      char[] charArray = dataStr.toCharArray();
      int ToChangeIndex = 0;

      for (int i = 0; i < charArray.length; i++) {
        if (i <= ToChangeIndex && i != 0) {
          continue;
        } else {
          if (charArray[i] == '%' && charArray[i + 1] == 'u'
              && i + 5 < charArray.length) {
            char[] tempArray = new char[] { charArray[i],
                charArray[i + 1], charArray[i + 2],
                charArray[i + 3], charArray[i + 4],
                charArray[i + 5] };
            ToDeocode += decodeUnicode(String.valueOf(tempArray));
            ToChangeIndex = i + 5;
          } else {
            ToDeocode += charArray[i];
            continue;
          }
        }
      }
    }
    return ToDeocode;
  }

  public String decodeUnicode(final String dataStr) {
    int start = 0;
    int end = 0;
    final StringBuffer buffer = new StringBuffer();
    while (start > -1) {
      end = dataStr.indexOf("\\u", start + 2);
      String charStr = "";
      if (end == -1) {
        charStr = dataStr.substring(start + 2, dataStr.length());
      } else {
        charStr = dataStr.substring(start + 2, end);
      }
      char letter = (char) Integer.parseInt(charStr, 16); // 16进制parse整形字符串。
      buffer.append(new Character(letter).toString());
      start = end;
    }
    return buffer.toString();
  }
}

2. com.test.tag.MyIteratorTag.java

package com.test.tag;

import java.io.File;
import java.io.IOException;
import java.util.List;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class MyIteratorTag extends TagSupport {

  private final String SEP = File.separator;
  private List<String[]> files = null;
  private List<String[]> data = null;
  private int columnSize = 0;

  @Override
  public int doStartTag() throws JspException {
    // TODO Auto-generated method stub

    JspWriter out = this.pageContext.getOut();
    StringBuffer sf = new StringBuffer();

    sf.append("<table style='width:1000;' border='1' cellspacing='0' cellpadding='10'>");
    sf.append("<tr><td>");
    sf.append("<table style='width:200;' border='0' cellspacing='0'>");   

    if (this.data == null || this.data.isEmpty()) {
      sf.append(" <tr>");
      sf.append("  <td>");
      sf.append("  <B> No Valid Data List is NULL </B> ");
      sf.append("  </td>");
      sf.append(" </tr>");
    } else {
      for (int i = 0; i < data.size(); i++) { 
        String[] trs = data.get(i);
        sf.append("<tr>");
        for (int j = 0; j < trs.length; j++) {           
          switch (j) {
          case 0:
            sf.append("<td>");
            sf.append("<a href='javascript:ReStartJSP("+i+")'>"+trs[j]+"</a>");
            sf.append("<input type='hidden' value='"+trs[j]+"' id='hidden_"+i+"'/>");
            sf.append("</td>");
            break;
          case 1:
            sf.append("<td>");
            sf.append("\t"+trs[j]);
            sf.append("</td>");
            break;
          case 2:
            sf.append("<td>");
            sf.append("??");
            sf.append("</td>");
            break;
          case 3:
            sf.append("<td>");
            sf.append("<input type='image' value='"+i+"' src='img"+SEP+"exchange_icon.png' onclick='showDIV(this)'/>");
            sf.append("</td>");
            break;

          default:
            sf.append("<td>");
            sf.append("<input type='image' value='"+trs[0]+"' src='img"+SEP+"exchange_icon.png' onclick='showDIV(this)'/>");
            sf.append("</td>");
            break;
          }
        }
        sf.append("</tr>");
      }
    }
    sf.append("</table>");
    sf.append("</td>");
    sf.append("<td>");
    sf.append("<table style='width:600;' border='0' cellspacing='0'>");

    if(this.files != null && !this.files.isEmpty()){
      for (int i = 0; i < files.size(); i++) { 
        String[] trs = files.get(i);
        sf.append("<tr><u>");
        for (int j = 0; j < trs.length; j++) { 
          sf.append("<td>");
          sf.append("\t"+trs[j]);
          sf.append("</td>");
        }
        sf.append("<td>");
        sf.append("<input type='image' value='"+trs[1]+"' src='img/uploadify-cancel.png' onclick='deleteFile(this.value)'/>");
//       System.out.println("trs["+i+"]"+trs[i]);
        sf.append("</td>");
        sf.append("</u></tr>");
      }
    }

    sf.append("</table>");
    sf.append("</td></tr>");
    sf.append("</table>");


    try {
      out.print(sf.toString());
    } catch (IOException e) {
      e.printStackTrace();
      throw new JspException(e.getMessage());
    }
    return super.doEndTag();
  }


  public List<String[]> getfiles() {
    return files;
  }

  public void setfiles(List<String[]> files) {
    this.files = files;
  }

  public List<String[]> getData() {
    return data;
  }

  public void setData(List<String[]> data) {
    this.data = data;
  }

  public int getColumnSize() {
    return columnSize;
  }

  public void setColumnSize(int columnSize) {
    this.columnSize = columnSize;
  }

}

3. com.test.util.FileStringUtil.java

package com.test.util;

import java.util.HashMap;
import java.util.Map;

public class FileStringUtil {

  public Map<String, String> getFileDetails(String fileString){
    Map<String, String> detailMap = new HashMap<>();
    String[] splitStr = fileString.split("\\|");
    for (int i = 0; i < splitStr.length; i++) {
      detailMap.put("fileDetail"+i, splitStr[i]);
    }
    return detailMap; 
  }
}

4. com.test.util.FileUtil.java

package com.test.util;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;

import org.apache.catalina.authenticator.SavedRequest;


public class FileUtil {

  private final String SEP = File.separator;
  int count = 0;


  public static String [] getFileName(String path){ 
    File file = new File(path); 
    String [] fileName = file.list(); 
    return fileName; 
  }

  public boolean isFileExist(String path) {
    try {
      File file = new File(path);
      return file.exists();
    } catch (Exception ex) {
      ex.printStackTrace();
    }

    return false;
  }

  public boolean mkDir(String path) {
    File dir = new File(path);
    boolean res = dir.mkdirs();
    return res;
  }

  public List<String> readTxtFile(String filePath) {
    List<String> resultList = new ArrayList<>();
    try {
      String encoding = "UTF-8";
      File file = new File(filePath);
      if (file.isFile() && file.exists()) { // 判断文件是否存在
        InputStreamReader read = new InputStreamReader(new FileInputStream(file), encoding);// 考虑到编码格式
        BufferedReader bufferedReader = new BufferedReader(read);
        String lineTxt = null;
        while ((lineTxt = bufferedReader.readLine()) != null) {
          if(lineTxt.length() < 2){
            continue;
          }else {
            resultList.add(lineTxt);
          }
        }
        read.close();
      } else {
        System.out.println("找不到指定的文件");
      }
    } catch (Exception e) {
      System.out.println("读取文件内容出错");
      e.printStackTrace();
    }
    return resultList; 
  }


  public List<String> readTxtFileByPath(String filePath,String Path) {
    String savePath = "c:\\"+Path;
    List<String> resultList = new ArrayList<>();
    try {
      String encoding = "UTF-8";
      File file = new File(filePath);
      if (file.isFile() && file.exists()) { // 判断文件是否存在
        InputStreamReader read = new InputStreamReader(new FileInputStream(file), encoding);// 考虑到编码格式
        BufferedReader bufferedReader = new BufferedReader(read);
        String lineTxt = null;
        int lineNumber = 0;
        while ((lineTxt = bufferedReader.readLine()) != null) {
          lineNumber++;
          System.out.println("lineNumber "+lineNumber);
          if(lineTxt.length() < 2){
            continue;
          }else {
            String lastRead = lineTxt.substring(lineTxt.lastIndexOf("|")+1,lineTxt.length());
            String fristRead = lineTxt.substring(0,lineTxt.indexOf("|"));
            if(lastRead.toUpperCase().equals(savePath.toUpperCase())){

              File savePathFile = new File(savePath);
              File[] files = savePathFile.listFiles();

              if(files.length == 0){//?文件?A所有文件不存在?r
                lineTxt = "";
                System.out.println("none file of "+savePath);
              }else {
                boolean fileDelete = true;
                for (int i = 0; i < files.length; i++) {
                  System.out.println("files" + files[i].getName());
                  System.out.println("fristRead"+fristRead);
                  if(fristRead.equals(files[i].getName())){
                    //?文件列表中存在一?t??文件名?列表文件名匹配?r,?明文件?]有被?h除
                    fileDelete = false;
                  }
                }
                if (fileDelete) {
                  //文件是否被?h除,是:?h除??l??;否:?????存留
                  deleteLineText(lineNumber);
                }else {
                  resultList.add(lineTxt);
                }
              }        
            }
          }

        }
        read.close();
      } else {
        System.out.println("找不到指定的文件");
      }
    } catch (Exception e) {
      System.out.println("读取文件内容出错");
      e.printStackTrace();
    }
    return resultList; 
  }


  public void deleteLineText(int lineNum){
//   BufferedReader br;
    try {
//     br = new  BufferedReader(new FileReader("c:/a.txt "));
      BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("c:\\a.txt"),"UTF-8")); 
      StringBuffer sb=new StringBuffer(4096);
      String temp=null;
      int  line=0;

      while((temp=br.readLine())!=null){
          line++;
          if(line==lineNum)  
            continue;
          sb.append(temp).append("\r\n");
//         sb.append(new String(temp.getBytes("Unicode"), "UTF-8")).append( "\r\n ");
      }
      br.close();
      OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream("c:/a.txt "),"UTF-8");   
      BufferedWriter writer=new BufferedWriter(write); 
//     BufferedWriter  bw=new  BufferedWriter(new FileWriter( "c:/a.txt "));
      writer.write(sb.toString());
      writer.close();
    } catch (FileNotFoundException e) {
      System.out.println(e.toString());
      e.printStackTrace();
    } catch (IOException e) {
      System.out.println(e.toString());
      e.printStackTrace();
    }

  }


  public void writeTxtFile(File file, String fileContent)  
  {   
    try  
    {   
      OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream(file),"UTF-8");   
      BufferedWriter writer=new BufferedWriter(write); 
      writer.write(fileContent);   
      writer.close();   
    } catch (Exception e)  
    {   
      e.printStackTrace();   
    } 
  }


  public int[] getAllFileSize(String[] filePath){
    int[] fileSizeArray = new int[filePath.length];
    for (int i = 0; i < filePath.length; i++) {
      if(!isFileExist("c:\\"+filePath[i])){
        mkDir("c:\\"+filePath[i]);
      }
      File file = new File("c:\\"+filePath[i]);
      File[] files = file.listFiles();
      fileSizeArray[i] = files.length;
    }
    return fileSizeArray;

  }

  public String deleteFile(){
    String result = "";
    if(count == 0){
      System.out.println("0");
      result = "0";
    }else {
      System.out.println("deleteFile");
      result = "deleteFile";
    }
    count++;
    return result;
  }

  public void appendMethod(String content) {

    try {
      File file = new File("C:\\a.txt");
      if (!file.exists()){    
         file.createNewFile();
        writeTxtFile(file,content);
      }else {
       Writer out = new BufferedWriter( new OutputStreamWriter(new FileOutputStream("C:\\a.txt",true),"UTF-8"));
       out.write("\r\n"+content);
       out.close();
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
  }


  public static boolean copyFile(String fromFile, String toFile) {
    try {
      InputStream fosfrom = new FileInputStream(fromFile);
      OutputStream fosto = new FileOutputStream(toFile);
      byte bt[] = new byte[4096];
      int c;
      while ((c = fosfrom.read(bt)) > 0) {
        fosto.write(bt, 0, c);
      }
      fosfrom.close();
      fosto.close();
      bt = null;
      return true;

    } catch (Exception ex) {
      ex.printStackTrace();
      return false;
    }
  }  
}

web.xml配置

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 

 <servlet> 
  <servlet-name>upload</servlet-name> 
  <servlet-class>com.bijian.study.Upload</servlet-class> 
 </servlet> 

 <servlet-mapping> 
  <servlet-name>upload</servlet-name> 
  <url-pattern>/servlet/Upload</url-pattern> 
 </servlet-mapping> 

 <welcome-file-list> 
  <welcome-file>index.jsp</welcome-file> 
 </welcome-file-list> 


<jsp-config> 
<taglib>
  <!-- 对应的uri jsp中声明的需要用到 -->
 <taglib-uri>my-taglib</taglib-uri>
 <!-- 对应标签描述文件所在的位置 -->
 <taglib-location>/WEB-INF/my-taglib.tld</taglib-location>
 </taglib> 
</jsp-config> 
</web-app>

index.jsp

<%@page import="org.apache.tomcat.jni.File"%>
<%@ page language="java" contentType="text/html; charset=utf-8" import="java.util.*" import="com.test.util.*"%> 
<%@ taglib uri="my-taglib" prefix="myTag"%>
<% 
  String path = request.getContextPath(); 
  String basePath = request.getScheme() + "://" 
      + request.getServerName() + ":" + request.getServerPort() 
      + path + "/"; 

  int SHOW_CONTROL = 0;

  final String RECORED_PATH = "c:\\a.txt";
  String getParameter = request.getParameter("num");
  if(getParameter !=null){
    System.out.println("getParameter "+getParameter);
    SHOW_CONTROL = Integer.parseInt(getParameter);
  }else{
    SHOW_CONTROL = 0;
  }


  List data = new ArrayList();
  String data1[] = new String[]{"相片","代工?","其他","??r??,"?D?t"};
  int data2[] = new FileUtil().getAllFileSize(data1);
  for(int i = 0;i<data1.length;i++){
    data.add(new String[]{data1[i],data2[i]+"","",""});
  }

  List files = new ArrayList();
  List<String> fileList = new FileUtil().readTxtFileByPath(RECORED_PATH,data1[SHOW_CONTROL]);
  int FILE_SIZE = fileList.size(); 
  int fileID[] = new int[FILE_SIZE];
  String fileName[] = new String[FILE_SIZE];
  String fileDate[] = new String[FILE_SIZE];
  String fileRemark[] = new String[FILE_SIZE];


  for(int i=0;i<FILE_SIZE;i++){
     Map<String,String> map =new FileStringUtil().getFileDetails(fileList.get(i));
     fileID[i] = i+1;
     fileName[i] = map.get("fileDetail0");
     fileDate[i] = map.get("fileDetail1");
     fileRemark[i] = map.get("fileDetail2");
     files.add(new String[]{fileID[i]+"",fileName[i],fileDate[i],fileRemark[i],""});
  }

  request.setAttribute("data" ,data);
  request.setAttribute("files" ,files);
%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
<base href="<%=basePath%>" rel="external nofollow" > 
<title>Upload</title> 

<!--装载文件--> 
<link href="css/uploadify.css" rel="external nofollow" rel="stylesheet" type="text/css" /> 
<link href="css/Regist.css" rel="external nofollow" type="text/css" />
<link href="css/jquery.ui.all.css" rel="external nofollow" rel="stylesheet">
<script type="text/javascript" src="uploadify/jquery-1.9.1.js"></script> 
<script type="text/javascript" src="uploadify/jquery.uploadify.min.js"></script> 

<!--ready事件--> 
<script type="text/javascript"> 
  $(document).ready(function() {   
    $("#uploadify").uploadify({ 
      'method':'get',
      'uploader' : 'servlet/Upload', 
      'swf' : 'uploadify/uploadify.swf', 
      'cancelImg' : 'img/uploadify-cancel.png', 
      'folder' : 'uploads',//您想将文件保存到的路径 
      'queueID' : 'fileQueue',//与下面的id对应 
      'queueSizeLimit' : 5, 
      'fileDesc' : 'rar文件或zip文件', 
      'fileExt' : '*.rar;*.zip', //控制可上传文件的扩展名,启用本项时需同时声明fileDesc 
      'auto' : false, 
      'multi' : false, 
      'uploadLimit' : 10, 
      'buttonText' : '???n案',
      'removeCompleted':false,
      onUploadStart: function(file) {
      $('#uploadify').uploadify(
      'settings', 'formData', {
      'save_path': escape(document.getElementById("save_type_select").options[document.getElementById("save_type_select").selectedIndex].value),
      'remark':escape(document.getElementById("remark").value)
      });}
      ,
      onUploadSuccess: function (file, data, response) {
        window.location.reload();
      } 
    }); 
  });


  function ReStartJSP(num){
    location.replace("http://localhost:8080/uploadifyTest/index.jsp?num="+num);
  }

  function onload(){
    initOptions();
    ReadTxtFile();
  }

  function initOptions(){
  // alert(isNaN(parseInt(size)));
    var num = <%=data1.length%>;
    for(var i = 0;i<num;i++){  
    var optionText = document.getElementById("hidden_"+i).value;
    document.getElementById("save_type_select").add(new Option(optionText,optionText));
    }
  }


  function setOptions(obj){
    var SelectObj = document.getElementById("save_type_select");
    SelectObj.options[parseInt(obj.value)].selected = true;
  }

  function showDIV(obj){

    var div = document.getElementById("fileUploadDIV");
    if(div.style.display == "none"){
      div.style.display = "block";
    }
    setOptions(obj);

  }
  function hindDIV(){
    var div = document.getElementById("fileUploadDIV");
    if(div.style.display == "block"){
      div.style.display = "none";
    }
  }


  function deleteFile(name){
    var showMessage = "c:\\"+"<%=data1[SHOW_CONTROL]%>"+"\\"+name;
    var fso = new ActiveXObject("Scripting.FileSystemObject");  
    if(fso.FileExists(showMessage)){
    fso.DeleteFile(showMessage);
    alert("delete success!!"); 
    location.replace("http://localhost:8080/uploadifyTest/index.jsp?num="+<%=SHOW_CONTROL%>);
    }

  }


</script> 
</head> 

<body onload="onload()"> 

 <myTag:iter columnSize="4" files="${files}" data="${data}" />

 </br></br></br>
 <div id="fileUploadDIV" style="display:none">
 <table id="upload_table" >
 <tr>
   <td><select id="save_type_select"></select></td>

   <td><input type="file" name="uploadify" id="uploadify"/> </td>

   <td><label>?湓]:</label ><input type="text" width="100px" id="remark" value='maah%e4u5848在哪呢你5874'/></td>

   <td><a href="javascript:$('#uploadify').uploadify('upload');" rel="external nofollow"  style="font-size:14px;font-weight:normal">上?</a></td>

   <td><a href="javascript:$('#uploadify').uploadify('cancel'); hindDIV()" rel="external nofollow" style="font-size: 14px; font-weight: normal">取消</a></td>
 </tr>
 </table>
 <div id="fileQueue" ></div> 
</div>
</body> 
</html>

至此,这个小项目就写到这里,下面是Demo连接

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。

Javascript 相关文章推荐
javascript 读取xml,写入xml 实现代码
Jul 10 Javascript
jMessageBox 基于jQuery的窗口插件
Dec 09 Javascript
关闭浏览器输入框自动补齐 兼容IE,FF,Chrome等主流浏览器
Feb 11 Javascript
jQuery中 attr() 方法使用小结
May 03 Javascript
javascript实现显示和隐藏div方法汇总
Aug 14 Javascript
JS密码生成与强度检测完整实例(附demo源码下载)
Apr 06 Javascript
Javascript单例模式的介绍和实例
Oct 08 Javascript
js,jq,css多方面实现简易下拉菜单功能
May 13 Javascript
JavaScript面向对象精要(上部)
Sep 12 Javascript
vue canvas绘制矩形并解决由clearRec带来的闪屏问题
Sep 02 Javascript
原生js实现点击按钮复制内容到剪切板
Nov 19 Javascript
利用Vue实现简易播放器的完整代码
Dec 30 Vue.js
微信小程序 ecshop地址三级联动实现实例代码
Feb 28 #Javascript
简单实现AngularJS轮播图效果
Apr 10 #Javascript
ie下js不执行的几种可能
Feb 28 #Javascript
jquery中绑定事件的异同
Feb 28 #Javascript
JS常见算法详解
Feb 28 #Javascript
vue.js树形组件之删除双击增加分支实例代码
Feb 28 #Javascript
jQuery插件MovingBoxes实现左右滑动中间放大图片效果
Feb 28 #Javascript
You might like
php+mysql开源XNA 聚合程序发布 下载
2007/07/13 PHP
最新的php 文件上传模型,支持多文件上传
2009/08/13 PHP
PHP的简易冒泡法代码分享
2012/08/28 PHP
codeigniter框架The URI you submitted has disallowed characters错误解决方法
2014/05/06 PHP
PHP生成json和xml类型接口数据格式
2015/05/17 PHP
Javascript-Mozilla和IE中的一个函数直接量的问题
2007/01/09 Javascript
Javascript 更新 JavaScript 数组的 uniq 方法
2008/01/23 Javascript
js生成验证码并直接在前端判断
2015/05/15 Javascript
Javascript BOM学习小结(六)
2015/11/26 Javascript
jQuery EasyUI菜单与按钮详解
2016/07/13 Javascript
微信小程序图片横向左右滑动案例
2017/05/19 Javascript
Vue.js实现在下拉列表区域外点击即可关闭下拉列表的功能(自定义下拉列表)
2017/05/30 Javascript
详解AngularJS之$window窗口对象
2018/01/17 Javascript
详细教你微信公众号正文页SVG交互开发技巧
2019/07/25 Javascript
vant-ui框架的一个bug(解决切换后onload不触发)
2020/11/11 Javascript
[01:38]DOTA2辉夜杯 欢乐的观众现场采访
2015/12/26 DOTA
Python Web框架Pylons中使用MongoDB的例子
2013/12/03 Python
在Python下尝试多线程编程
2015/04/28 Python
python 自动化将markdown文件转成html文件的方法
2016/09/23 Python
python密码错误三次锁定(实例讲解)
2017/11/14 Python
Python中用psycopg2模块操作PostgreSQL方法
2017/11/28 Python
Python使用cx_Freeze库生成msi格式安装文件的方法
2018/07/10 Python
500行代码使用python写个微信小游戏飞机大战游戏
2019/10/16 Python
django连接mysql数据库及建表操作实例详解
2019/12/10 Python
利用HTML5画出一个坦克的形状具体实现代码
2013/06/20 HTML / CSS
法国太阳镜店:Sunglasses Shop
2016/08/27 全球购物
美国在线宠物用品商店:Entirely Pets
2017/01/01 全球购物
大二自我鉴定范文
2013/10/05 职场文书
综合实践活动总结
2014/05/05 职场文书
泸县召开党的群众路线教育实践活动总结大会新闻稿
2014/10/21 职场文书
安全检查汇报材料
2014/12/26 职场文书
给上级领导的感谢信
2015/01/22 职场文书
会计求职简历自我评价
2015/03/10 职场文书
英语专业毕业论文答辩开场白
2015/05/27 职场文书
MySQL 全文索引使用指南
2021/05/25 MySQL
小程序自定义轮播图圆点组件
2022/06/25 Javascript