ASP.NET中怎样动态更改Table控件的背景颜色?在线等!Table控件为HTML中的控件.非常感谢!
解决方案 »
- 急救
- 关于分页存储过程+UI实现
- 【重新发帖】Asp.net 前台界面的字符串连接问题...
- 弹出一个div层怎样禁用后面的主页?
- 怎样获得WebUserControl中的组件的内容?还有能给WebUserControl添加事件么?给个例子
- 请教asp.net子窗体关闭后刷新父页面的UpdatePanel
- 用LINKBUTTON做的下载按扭,在2000下访问服务器可以下载,但XP下下载不能!!!
- 大家好!国庆节快乐!哈哈~~也请各位达人回答MM的一个小问题 `````?~?~~?
- 求一篇详细介绍asp.net技术的文章,急!!!!!!!!!
- 难题,我想求几个textbox的和
- 请教高手关于session问题
- 菜鸟提问: 请问我用的是asp:button控件,如何点击后条件满足后弹出一个对话框?
或者改成server的,就可以直接控制了
具体的你搜索在GOOGLE里
window.document.getElementById("Table1").style.backgroundColor="blue";
2.Response.Write("<script>window.document.getElementById('Table1').style.backgroundColor='blue'</script>");以上两种方法都不行啊.第一种提示没有using集合.请多指教!
现在我想颜色是动态的,颜色的值是来自上一个窗体的,我可以在此页上放置一个Label,用Request.Querysting["aaa"]得到,但怎样传给函数bgcolor()呢?
<body onload="bgcolor();">
<script language="javascript">
function bgcolor()
{
window.document.getElementById("t_frame_left").style.backgroundColor="#cc9966";
}
</script>
<body onload="bgcolor(window.text1.value);">
<script language="javascript">
function bgcolor(str)
{
window.document.getElementById("t_frame_left").style.backgroundColor=str;
}
</script>
现在text1这个控件是HTML控件,我想让它得到上一个网页传来的参数值,如果是服务器控件的话,直接
Request.Querysting["aaa"]就行了,可这是html控件,该怎么办?给个思路也行,谢谢了!
实现如下:
function GetUrl()
{
var url=parent.location.search;
var Request = new Object();
var parameter;
if(url.indexOf("?") != -1)
{
var splitURL = new Array();
splitURL = url.split("&");
}
window.document.getElementById("text1").value = splitURL[i].split("=")[1];
}
注:splitURL[i]中的i是要赋给text1的参数在前画面传的所有参数中的位置,如果你把要传给text1的参数放在第一位,i就改成0,
function GetUrl()
{
var url=parent.location.search;
var parameter;
if(url.indexOf("?") != -1)
{
var splitURL = new Array();
splitURL = url.split("&");
window.document.getElementById("text1").value = splitURL[i].split("=")[1];
}
}