UpdatePanel 加载后 调用Js脚本
2013-03-20 21:01
344 查看
在UpdatePanel更新时,改变其内控件的width。
这个改了好久。。。最后找到下面这篇文章,终于解决问题了。。。
Execute JavaScript when an UpdatePanel is updated
protected void upImg_Load(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(upImg,this.GetType(),"panelSize","panelSize();",true);
}
这个改了好久。。。最后找到下面这篇文章,终于解决问题了。。。
Execute JavaScript when an UpdatePanel is updated
protected void upImg_Load(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(upImg,this.GetType(),"panelSize","panelSize();",true);
}
function panelSize() { var panel = document.getElementById("<%= pl_Image.ClientID %>"); //var panel = document.getElementById("pl_Image"); panel.style.width = (document.getElementById("divPanel").offsetWidth - 3) + "px"; //alert(panel.style.width); }
相关文章推荐
- UpdatePanel中内容异步加载后,调用JS脚本方法
- updatepanel刷新后重新加载js脚本问题
- 如何在UpdatePanel中调用JS客户端脚本
- js 脚本无法控制的地方. 该死的UPdatepanel.使用UPdatepanel页面不visual studio 不报错.
- UpdatePanel里如果要调用JavaScript脚本应注意
- asp.net updatepanel 导致JS不能加载,而无法使用
- AJAX加载后js失效问题及ASP.NET中UpdatePanel内控件的JS失效的问题
- UpdatePanel完成后调用js
- UpdatePanel 后台常调用的的JS语句
- UpdatePanel完成后调用js
- Asp.Net Ajax结局方案:UpdatePanel,ScriptManager,动态加载JS框架。
- UpdatePanel 更新后JS调用UpdatePanel外控件
- UpdatePanel中用后台CS代码调用JS代码,先执行控件事件,后触发JS
- asp.net updatepanel 导致JS不能加载,而无法使用的解决方法
- 在asp.net UpdatePanel 执行脚本JS
- WebView加载html代码,js脚本中调用android对象的方法...
- asp.net updatepanel 导致JS不能加载,而无法使用的解决方法
- UpdatePanel触发javascript脚本技巧javascript
- JS脚本调用类
- jQuery懒加载插件 – jquery.lazyload.js简单调用