如何在回发时保持ajax模型弹出面板的滚动条位置 [英] How to maintain scroll bar position of ajax model popup panel while postback
本文介绍了如何在回发时保持ajax模型弹出面板的滚动条位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果有工作示例,请与我分享。提前谢谢
Please if have working example than please share with me.thanks in advance
推荐答案
在您的页面上使用此项< head>如下所示< / head>
Use this on your page <head>given below</head>
<script language="javascript" type="text/javascript">
var Maintain;
(document).ready(function(){
getScrollPosition();
Sys.WebForms.PageRequestManager.getInstance()。add_beginRequest(getScrollPosition);
Sys.WebForms.PageRequestManager .getInstance()。add_endRequest(setScrollPosition);
});
function pageLoad(){
var popup =
(document).ready(function() { getScrollPosition(); Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(getScrollPosition); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(setScrollPosition); }); function pageLoad() { var popup =
find('<% = nameofmodalpopupid.ClientID %> ');
popup.add_shown(setScrollPosition);
}
函数getScrollPosition(){
维护=
find('<%=nameofmodalpopupid.ClientID%>'); popup.add_shown(setScrollPosition); } function getScrollPosition() { Maintain =
这篇关于如何在回发时保持ajax模型弹出面板的滚动条位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文