如何在asp.net中滚动页面 [英] how to scrollup the page in asp.net

查看:73
本文介绍了如何在asp.net中滚动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.net页面,页面底部有一个提交按钮。



当用户点击提交时,我想要页面向上滚动这有可能,如果是这样的话?



请帮助语法。



谢谢

I have an ASP.net page, with a Submit button placed at the bottom of the page.

When the user clicks on Submit, I want the page to scroll up. Would that be possible, if so how ?

Please help with syntax.

Thanks

推荐答案

将以下内容添加到您的aspx文件中

add the below into you aspx file
<asp:button id="btn_submit" runat="server" text="Sumbit" onclientclick="javascript:window.scrollTo(0,0);"/>


这篇关于如何在asp.net中滚动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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