点击按钮1显示图片A,再次点击就会隐藏A. 点击按钮2显示图片ABC 点击按钮3隐藏图片ABC
1个回答
展开全部
protected void Button1_Click1(object sender, EventArgs e)
{
if (Image1.Visible = false)
{
Image1.Visible = true;
}
else
{
Image1.Visible = false;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Image2.Visible = true;
}
protected void Button3_Click(object sender, EventArgs e)
{
Image3.Visible = false;
}
{
if (Image1.Visible = false)
{
Image1.Visible = true;
}
else
{
Image1.Visible = false;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Image2.Visible = true;
}
protected void Button3_Click(object sender, EventArgs e)
{
Image3.Visible = false;
}
追问
能不能有中文的详细步骤解析呢?我刚学的flash,很需要你的帮助。
追答
protected void Button1_Click1(object sender, EventArgs e) { //点击按钮事件
if (Image1.Visible = false)//如果A隐藏
{
Image1.Visible = true;就显示
}
else
{
Image1.Visible = false;////否则就隐藏
}
}
protected void Button2_Click(object sender, EventArgs e)按钮2
{
Image2.Visible = true;图片显示
}
protected void Button3_Click(object sender, EventArgs e)//按钮3
{
Image3.Visible = false;隐藏
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询