javascript - Paste function in jquery/java script on button click -
i have textbox write website url.and place button beside that.
i want if user copy url place , click on button copied url paste in textbox.
now can use ctrl+v paste url in text box.but mobile user not able use that. need on click on button copied url paste in textbox.
any highly appreciable , in advance.
based upon many questions past...
- javascript clipboard data on paste event (cross browser)
- get current clipboard content?
- is possible read clipboard in firefox, safari , chrome using javascript?
- how copy clipboard in javascript?
... answer "no, it's impossible."
i suggest, though, you've skipped important step in development process. problem face want allow mobile users painlessly enter text (in particular, urls, pain type) other sources textbox on site. take step , @ other possible solutions problem don't involve javascript access user's clipboard.
in fact, 'solution' you're trying implement doesn't user, because 'click paste' button helpful mobile user if they've succeeded in copying clipboard, , if they've managed that, presumably know how native copy/paste functionality of phone browser works, don't need button. there 2 necessary steps in user flow you've described: copying url other source, , pasting on site. if you're asking possible, possibly make second step easier user.
instead, figure should check how copy , paste work on different available brands of smart phones , browsers. if of them use obscure or opaque interfaces worry users may unfamiliar with, have button near text box shown users of platforms gives them platform-targeted instructions on how use native copy , paste functionality.
Comments
Post a Comment