feedback.js server api

前端 未结 1 1709
南方客
南方客 2021-02-15 23:18

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.

how can I

相关标签:
1条回答
  • 2021-02-15 23:52

    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.

    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 : 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.

    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.

    0 讨论(0)
提交回复
热议问题