<a href="#" onclick="javascript:func(aaa)"><img src="..." border="1"></a>
或者 <img src="..." border="1" onclick="javascript:func(aaa)">
總之就是單擊了圖片後,就執行客戶端的腳本,而且該腳本需要在客戶端頁面文件中。
我用 <asp:ImageButton /> 及 <asp:LinkButton /> 做不出呢。
<asp:ImageButton id=imgbtn />
在后台写代码
imgbtn.Attrib.add("OnClick","Your client code");
this.Page.RegisterClientScriptBlock(Description,scriptString);