gpt4 book ai didi

javascript - 安培 : Scroll to id by Select change value?

转载 作者:行者123 更新时间:2023-11-28 04:44:44 25 4
gpt4 key购买 nike

I would like to know how to implement a select with various options which, when selected, jumps to the part of the content which you selected in the list.

基于:https://ampbyexample.com/visual_effects/scroll_to_top/

<select on="change:{event.value}.scrollTo(duration=200)" id="st-select">
<option selected disabled hidden value="st-select">Quick Select...</option>
<option value="1">Option #1</option>
<option value="2">Option #2</option>
<option value="3">Option #3</option>
<option value="4">Option #4</option>
<option value="5">Option #5</option>
<option value="6">Option #6</option>
<option value="7">Option #7</option>
</select>
... for example..
<div id="3"></div>

提前致谢!

最佳答案

目前这是不可能的(但应该是)。这是一个 feature request .

关于javascript - 安培 : Scroll to id by Select change value?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51782847/

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