根据下拉列表选择的值滚动页面 [英] Scroll the page based on dropdownlist selected value

查看:70
本文介绍了根据下拉列表选择的值滚动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



.aspx页面看起来像......

我有一个下拉列表,其中包含一,二,三,四,五的值。 br />


one ::



二:



三:



四:





五:



六:



在下拉列表中选择四个时,页面需要滚动并且点''四:''。功能类似于微软word文档。点击目录标题,页面将导航并显示正确的定义。

请帮助我! !!

解决方案

您将需要使用锚点(< a>) http://www.w3schools.com/html/html_links.asp [ ^ ]



然后使用JavaScript来attac h到select的onChange,然后只需设置窗口的哈希就可以跳转到相关的锚点 http:// www .w3schools.com / jsref / prop_loc_hash.asp [ ^

Hi ,
The .aspx page looks like...
I have a dropdownlist which contains the value like one,two,three,four,five.

one::

Two:

Three:

Four:


Five:

Six:

On selecting the ''four'' in the dropdownlist,The page needs to scroll and points the ''Four:'' .The functionality will works similar to the microsoft word document.On click of table of contents heading,the page will navigate and shows the proper definition.
Please help me!!!

解决方案

You are going to need to use anchors (<a>) http://www.w3schools.com/html/html_links.asp[^]

Then use JavaScript to attach to the onChange of the select and then just set the hash for the window to jump down to the related anchor http://www.w3schools.com/jsref/prop_loc_hash.asp[^]


这篇关于根据下拉列表选择的值滚动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆