zoukankan      html  css  js  c++  java
  • kindoreditor上传图片

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8" />
    <title>ImageDialog Examples</title>
    <link rel="stylesheet" href="../themes/default/default.css" />
    <script src="../kindeditor.js"></script>
    <script src="../lang/zh_CN.js"></script>
    <script>
    KindEditor.ready(function(K) {
    var editor = K.editor({
    allowFileManager : true
    });
    K('#image3').click(function() {
    editor.loadPlugin('image', function() {
    editor.plugin.imageDialog({
    showRemote : false,
    imageUrl : K('#url3').val(),
    clickFn : function(url, title, width, height, border, align) {
    K('#url3').val(url);
    editor.hideDialog();
    }
    });
    });
    });
    });
    </script>
    </head>
    <body>

    <p><input type="text" id="url3" value="" /> <input type="button" id="image3" value="选择图片" />(本地上传)</p>
    </body>
    </html>

    我看着,kindeditor是使用ajax异步上传图片机制,返回上传文件路径,upload_json.php是原生的php上传代码,用着还可以。

  • 相关阅读:
    NXOpen 创建方体block代码
    Mysql---2 DDL DML DQL DCL
    Mysql数据库--1数据库操作
    FFmpeg
    Servlet Web
    Java web Springboot
    Java 网络
    Java 注解 反射
    Java 线程状态
    Java Lambda
  • 原文地址:https://www.cnblogs.com/liuwenbohhh/p/4414073.html
Copyright © 2011-2022 走看看