feedback.js服务器API [英] feedback.js server api

查看:184
本文介绍了feedback.js服务器API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

feedback.js 是一个很棒的jquery插件,它允许您创建包含屏幕截图的反馈表单,以及与表单一起在客户端浏览器上创建的

feedback.js is a great jquery plugin that allows you to create feedback forms which include a screenshot, created on the clients browser, along with the form.

如何将捕获的图像和用户评论发送到服务器端api?

how can I send captured image and user's review to server side api?

推荐答案

实际上,feedback.js是一部令人难以置信的javascript.非常感谢Niklas von Hertzen!不过,它并不依赖jQuery,但是您可以在同一页面中同时使用它们.

Indeed, feedback.js is an incredible piece of javascript. Thank you very much, Niklas von Hertzen! It does not depend on jQuery, though, but you can use both in the same page.

您可以通过传递"url"选项将图像发送到服务器.反馈功能支持许多选项,例如:

You can send the image to a server by passing the 'url' option. The Feedback function supports many options, for example:

Feedback({h2cPath:'/js/html2canvas.js',
          url: '/send/email/uri/on/server',
          label: "Send an email",
          header: "Let's send an email!",
          messageSuccess: "Done!",
          messageError: "Uh oh..."
        })

  • h2cPath:html2canvas.js文件的位置(强制性,其他选项是可选的).
  • url:用户提交反馈时调用的URL.这是您的问题的答案.
  • 标签:反馈按钮的文字.
  • header:弹出窗口的标题文本.
    • h2cPath : the location of the html2canvas.js file (mandatory, other options are optional).
    • url : the URL called when the user submits feedback. This is the answer to your question.
    • label : text of the feedback button.
    • header : header text of popup window.
    • 使用HTTP POST方法调用在url中指定的URL,并且图像在'data'参数中.图片本身被编码为 DOMString .如果您想知道其中包含的内容,请查看 toDataURL 的规范.您用户输入的其他信息将包含在其他参数中,具体取决于您定义的表单域.

      The URL specified in the url is called using the HTTP POST method, with the image in the 'data' parameter. The image itself is encoded as a DOMString. If you want to know what it contains exactly, look at the specification of toDataURL. Other information that your users have entered comes in other parameters, depending on the form-fields you define.

      这篇关于feedback.js服务器API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆