gpt4 book ai didi

jQuery 从输入文本框中显示图像预览

转载 作者:太空宇宙 更新时间:2023-11-03 17:51:45 24 4
gpt4 key购买 nike

我需要使用 type="text" 的输入框值使用 bootstrap popover 显示图像预览,如下所示:

enter image description here

HTML:

 <input type="text" class="form-control" value="https://secure.gravatar.com/avatar/b64518ca2a465c3ef67299a39758c383?s=100&r=g&d=mm">

如何在输入悬停中显示预览?!

最佳答案

您可以使用此示例代码:

$(function () {
$("#example")
.popover({ title: 'Twitter Bootstrap Popover', content: "It's so simple to create a tooltop for my website!" })
.blur(function () {
$(this).popover('hide');
});
});

关于jQuery 从输入文本框中显示图像预览,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27218316/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com