主题:谁有办法利用javascript脚本控制一个Panel的显示、隐藏?
goodsirliu
[专家分:180] 发布于 2006-01-12 14:33:00
谁有办法利用javascript脚本控制一个Panel的显示、隐藏?在后台处理太麻烦了!
回复列表 (共2个回复)
沙发
ricky99 [专家分:40] 发布于 2006-01-12 21:01:00
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="CombinePics.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<script language="javascript">
function showPanel()
{
document.getElementById('Panel1').style.display = "";
}
function closePanel()
{
document.getElementById('Panel1').style.display = "none";
}
</script>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<img src="image.aspx">
<asp:Panel id="Panel1" style=" Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 288px" runat="server" Width="322px" Height="107px" BackColor="Olive">Panel</asp:Panel>
<a href="javascript:showPanel()">showDiv</a>
<a href="javascript:closePanel()">hideDiv</a>
</form>
</body>
</HTML>
板凳
goodsirliu [专家分:180] 发布于 2006-01-12 21:17:00
谢谢,我试了一个多小时都没搞定,呵呵!
我来回复