Take Screenshot of Browser via JavaScript (or something else)

前端 未结 15 1935
天命终不由人
天命终不由人 2020-12-15 04:43

For support reasons I want to be able for a user to take a screenshot of the current browser window as easy as possible and send it over to the server.

Any (crazy)

相关标签:
15条回答
  • 2020-12-15 05:33

    i thing you need a activeX controls. without it i can't imagine. you can force user to install them first after the installation on client side activex controls should work and you can capture.

    0 讨论(0)
  • 2020-12-15 05:36

    Seems to me that support needs (at least) the answers for two questions:

    1. What does the screen look like? and
    2. Why does it look that way?

    A screenshot -- a visual -- is very necessary and answers the first question, but it can't answer the second.

    As a first attempt, I'd try to send the entire page up to support. The support tech could display that page in his browser (answers the first question); and could also see the current state of the customer's html (helps to answer the second question).

    I'd try to send as much of the page as is available to the client JS by way of AJAX or as the payload of a form. I'd also send info not on the page: anything that affects the state of the page, like cookies or session IDs or whatever.

    The cust might have a submit-like button to start the process.

    I think that would work. Let's see: it needs some CGI somewhere on the server that catches the incoming user page and makes it available to support, maybe by writing a disk file. Then the support person can load (or have loaded automatically) that same page. All the other info (cookies and so on) can be put into the page that support sees.

    PLUS: the client JS that handles the submit-button onclick( ) could also include any useful JS variable values!

    Hey, this can work! I'm getting psyched :-)

    HTH

    -- pete

    0 讨论(0)
  • 2020-12-15 05:36

    Perhaps http://html2canvas.hertzen.com/ could be used. Then you can capture the display and then process it.

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