作者piadoro (We are X)
看板Visual_Basic
标题[.NET] Imagebutton 按下後图片可以修改
时间Thu Aug 13 19:22:37 2009
请输入专案类型(网站专案或者应用程式专案):网站专案
我想要做到
在Imagebutton滑鼠在imagebutton上时可以变另一张图,
如果按下时也可以变另一张图要怎麽做
以下是我的程式码
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ImageButton1.Attributes.Add("onmouseover", "this.src = 'image/com2_01.gif'")
ImageButton1.Attributes.Add("onmouseout", "this.src = 'image/com1_01.gif'")
ImageButton1.Attributes.Add("onclick", "this.src = 'image/com2_01.gif'")
End If
End Sub
目前的状况是滑鼠移动时 都可以变换图片
可是当我的button按下後无法变成'image/com2_01.gif'
请问要怎麽改呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 124.8.79.40
※ 编辑: piadoro 来自: 124.8.79.40 (08/13 19:38)
1F:→ MOONRAKER:阿你onclick属性只加在图片上 按按钮当然什麽都不会发生 08/14 13:34