如何在javascript中滚动到验证摘要 [英] how to scroll to validation summary in javascript
本文介绍了如何在javascript中滚动到验证摘要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当验证摘要显示时,它必须得到顶部。
我尝试了以下脚本
< script type = text / javascript >
window.scrollTo = function(x,y){
return true;
}
< / script >
但它不会顶部
谢谢
解决方案
如下所示...
window .scrollTo( 0 , 0 );
Whenever validation summary displays it has to got the top.
I tried the following scripts
<script type="text/javascript">
window.scrollTo = function (x, y) {
return true;
}
</script>
but it is not going to top
Thank you
解决方案
Do like below...
window.scrollTo(0, 0);
这篇关于如何在javascript中滚动到验证摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文