gpt4 book ai didi

html - Bootstrap : Make glyphicon within input clickable

转载 作者:搜寻专家 更新时间:2023-10-31 22:40:57 27 4
gpt4 key购买 nike

我有以下生成此代码的代码:enter image description here

 <div class='input-group manualInput'>
<input id='address-input' type='text' class='form-control' placeholder='Enter your current location!'/>
<span class='input-group-addon'>
<i class='glyphicon glyphicon-search'></i>
</span>
</div>

如何使字形图标可点击?并调用一个JS函数

最佳答案

像这样添加一个 JavaScript onClick 事件:

<span class='input-group-addon'>
<i class='glyphicon glyphicon-search' onclick="myfunction();"></i>
</span>

关于html - Bootstrap : Make glyphicon within input clickable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36406939/

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