asp.net中如何改变DIV的高度
我现在遇到一个问题:
页面有一个div,id为container,我现在要通过点击按钮向里面动态添加控件,由于container下面还有其他的div,所以我需要在添加控件后增加container的高度,保持页面的布局,首先我想到了用JavaScript
<head runat="server">
<title>无标题页 </title>
<script type="text/javascript">
function AddHeight()
{
var div = document.getElementById("container");
var height=div.clientHeight ;
alert(height);
height+=200;
alert(height);
div.style.height=height+"px";
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="container" runat="server" style="width:700px;height:200px; background-color:#469ff3"> </div>
<div style=" background-color:Red;">
<asp:Button ID="Add" runat="server" Text="Button"
onclick="Add_Click" OnClientClick="AddHeigh
相关问答:
哪位大哥有没有ASP.NET中利用Cookies实现用户自动登录的代码...谢谢了...越详细越好....
什么意思?自动登录?
mark 貌视是存储cookies 我也对cook比较迷糊 关注下
既然你知道用cookies自己动动大脑多好! ......
asp.net ajax中updatepanel里面的控件里面有个button和若干textbox
我点击button验证信息出现,但是就是无法拦截我button后面运行的事件!
验证的代码是JS验证还是.net中的验证控件,或是按钮事件中的后台验证?
......
<table style="width: 1000px"><tr>
<td style="height: 38px; width: 35px;">
姓名</td>
......
静态模板:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/ ......