转移焦点 [英] shift focus

查看:95
本文介绍了转移焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在asp.net中设计了一个Web表单.我希望Javascript将页面的焦点移至单击按钮时的顶部.

请帮我.


sumit


i have a web form designed in asp.net. i want a javascript to shift the focus of the page to top on a button click.

plz help me on that.


sumit

推荐答案

window.scrollTo(x,y);使用x = 0和y = 0可能是一个解决方案,具体取决于您要实现的目标.

例如,请此处 [
window.scrollTo(x, y); using x=0 and y=0, might be a solution depending on what you want to achieve.

For an example look here[^].


这篇关于转移焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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