当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Copy and paste an image URL doesn't work on many mobile devices. Is there a work-around it?

问题描述:

This question has been raised many times but I couldn't find any concrete sample on how to solve the problem. As you know many mobile devices, especially those running iOS don't allow users to copy an image from a web page and paste its URL in an asp:TextBox . However the image URL can be pasted in the browser's address field. I find this akward.

My scenario is that I have a picture album on an aspx page. On the same page there is a rich text editor. On desktops, users can drag the image from the album to the editor. Of course this works well on desktop computers but not on most mobile devices so my plan B was to allow the user to copy the image URL and paste it in the textarea. But that doesn't work either. Is there any concrete javascript simple code on how to work around that problem? I found couple of tricks but they didn't make sense to me.... They are too heavy for a mobile device. Is there anyone who can provide me with a simple trick? Code please since I'm totally ignorant when it comes to javascript.

I want to insert the image URL in this textbox:

<asp:TextBox ValidateRequestMode="Disabled" class="form-control" Style="width: 100%; max-width: 600px" ID="aboutTextBox" runat="server" Text='<%# Bind("about") %>' TextMode="MultiLine" Rows="30" />

Thanks

分享给朋友:
您可能感兴趣的文章:
随机阅读: