本文介绍了Java脚本不适用于Ascx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个branch.js文件,在这里我要这样写
I have a branch.js file, in this i am going to write like this
function BSC_ShowControl()
{
var ele = document.getElementById("BSC_FullScreen");
ele.style.zIndex = 1000 - 1;
}
BSC_FullScreen是一个div BranchSearch.ascx分配有它
现在我正在从aspx.cs文件调用BSC_ShowControl()函数
问题是 ele 为空,因此出现错误
任何帮助...
BSC_FullScreen is a div BranchSearch.ascx is assigned with it
now i am calling BSC_ShowControl() function from aspx.cs file
Problem is ele is getting null, so that getting error
any help...
推荐答案
var ele = document.getElementById(''<%= BSC_FullScreen.ClientID %>'');
这篇关于Java脚本不适用于Ascx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!