我如何在可满足的中选择整个URL地址
在可满足的链接中,链接不起作用,因此我认为最好的解决方案是至少在光标位于URL中的任何部分时,都可以单击一单击或两次单击,然后右键单击,然后右键单击和去网站。是否有JavaScript解决方案,类似于Android Phone的长压和粘贴?
< div contentectiate =“ true”>在此处,然后完整的URL https://gizmodo.com/e-ink-kaleido-3-gallery-3-gallery-3-foldable-color-e-readers-color-e-readers-18484848848848848842166但是我只想从一两个点击中选择URL,如何? </div>
可满足的:
some text here, then the complete url https://gizmodo.com/e-ink-kaleido-3-gallery-3-foldable-color-e-readers-1848842166 but i just want to select the url with one or two clicks, how?in contenteditable, links don't work, so i'm thinking the best solution is to at least be able to select an entire url with one click or two clicks when the cursor is in any part of the url, then right-click and go to the site. is there a javascript solution to this, something similar to android phone's long-press-select and paste?
<div contenteditable="true">some text here, then the complete url https://gizmodo.com/e-ink-kaleido-3-gallery-3-foldable-color-e-readers-1848842166 but i just want to select the url with one or two clicks, how? </div>
contenteditable:
some text here, then the complete url https://gizmodo.com/e-ink-kaleido-3-gallery-3-foldable-color-e-readers-1848842166 but i just want to select the url with one or two clicks, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以用
锚标记
替换URL字符串,然后连接onclick
侦听器以导航到单击时:(限制了摘要中的导航,但应在普通窗口中起作用)
You could replace the url strings with
anchor tags
and attach anonclick
listener to navigate to the url on click:(The navigation in the snippet iframe is prevented but it should work in a normal window)