我如何在asp.net用户控件中运行javascript [英] how can i run the javascript in asp.net user control
本文介绍了我如何在asp.net用户控件中运行javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能帮我在我的用户控件中运行Java脚本.
我的Javascript是这样的:
Hi,
Can any one help me, to run the java script in my user control.
My Javascript is like this:
<script language="javascript" type ="text/javascript" >
var intwidth;
intwidth = window.screen.width;
intwidth = intwidth - 423;
var strwidth = intwidth + "Px";
document.getElementById("upRightSide").style.width = strwidth;
</script>
我想在用户控件加载中运行此脚本.
问候,
S.Inayat Basha
I want to run this script in user control load.
Regards,
S.Inayat Basha
推荐答案
在不知道或看不到我会雇用的所有细节的情况下,问题在于upRightSide.请记住,asp.net将修改名称,因此该特定ID不在页面上.检查渲染的输出.
Without knowing or seeing all the details I would hires the problem is with upRightSide. Remember asp.net will mangle the name so this specific Id is not on the page. Check the rendered output.
这篇关于我如何在asp.net用户控件中运行javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文